![]() |
||||||||||
|
||||||||||
Clarke and foodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2088 Accepted Submission(s): 1007 Problem Description Clarke is a patient with multiple personality disorder. One day, Clarke turned into a cook, was shopping for food. Clarke has bought $n$ food. The volume of the $i$th food is $v_i$. Now Clarke has a pack with volume $V$. He wants to carry food as much as possible. Tell him the maxmium number he can brought with this pack. Input The first line contains an integer $T(1 \le T \le 10)$, the number of the test cases. For each test case: The first line contains two integers $n, V(1 \le n \le 10^5, 1 \le V \le 10^9)$. The second line contains $n$ integers, the $i$th integer denotes $v_i(1 \le v_i \le 10^9)$. Output For each test case, print a line with an integer which denotes the answer. Sample Input
Sample Output
Source | ||||||||||
|