P19459 [CodeChef] HOLIDAYS
普及-
题目描述

Ved is a salesman. He needs to earn at least W rupees in N days for his livelihood. However, on a given day i (1 ≤ i ≤ N), he can only earn A_{i} rupees by working on that day.

Ved, being a lazy salesman, wants to take as many holidays as possible. It is known that on a holiday, Ved does not work and thus does not earn anything. Help maximize the number of days on which Ved can take a holiday.

It is guaranteed that Ved can always earn at least W rupees by working on all days.

------ Input Format ------

  • The first line contains a single integer T - the number of test cases. Then the test cases follow.
  • The first line of each test case contains two integers N and W - the size of the array A and the money Ved has to earn in those N days.
  • The second line of each test case contains $N space-separated integers A_{1}, A_{2}, \dots, A_{N}$ denoting the money which Ved can earn on each day.

------ Output Format ------

For each test case, output the maximum number of holidays Ved can take.

------ Constraints ------

$1 ≤T ≤100$
$1 ≤W ≤10000$
$1 ≤N ≤100$
$1 ≤A_{i} ≤100$
- It is guaranteed that Ved can always earn at least $W$ rupees by working on all days.

----- Sample Input 1 ------
3
5 10
3 2 6 1 3
4 15
3 2 4 6
6 8
9 12 6 5 2 2

----- Sample Output 1 ------
2
0
5

----- explanation 1 ------
Test case-1: Ved can work on $2$-nd, $3$-rd and $5$-th day earning $2 + 6 + 3 = 11$ rupees $≥ W$ rupees. Thus he can take $2$ holidays on the $1$-st and the $4$-th day.

Test case-2: Ved has to work on all days to earn $≥ W$ rupees. Thus he can not take any holidays.

Test case-3: Ved can work on $2$-nd day earning $12$ rupees $≥ W$ rupees. Thus he can take holiday on the remaining days.

输入格式

见题面

输出格式

见题面

样例输入
3 5 10 3 2 6 1 3 4 15 3 2 4 6 6 8 9 12 6 5 2 2
样例输出
2 0 5