#P324. 【例55.2】 约翰书架
【例55.2】 约翰书架
Description
John recently bought a bookshelf to store his cow-raising books, but it quickly filled up, leaving only the top shelf empty.
John has cows (), each with its own height (), and the total height of all cows is . The bookshelf has a height ().
To reach the top shelf, cows can stand on each other's backs, stacking up until their total height is at least the height of the bookshelf. Of course, the more cows used, the more dangerous it becomes. Help John find the solution that uses the minimum number of cows to reach the top shelf.
Input Format
The first line contains two space-separated integers and ;
The next lines: the -th line contains the integer .
Output Format
The minimum number of cows needed to reach the height of the bookshelf.
Sample
6 40
6
18
11
13
19
113