P22114 [CodeChef] AMMEAT
普及-
题目描述

Andrew likes meatballs very much.
He has N plates of meatballs, here the i^{th} plate contains P_{i} meatballs. You need to find the minimal number of plates Andrew needs to take to his trip to Las Vegas, if he wants to eat there at least M meatballs. Note that each plate is already packed, i.e. he cannot change the amount of meatballs on any plate.

------ Input ------

The first line of the input contains an integer T, denoting the number of test cases. The description of T test cases follows. The first line of each test case contains two space-separated integers N and M. The second line contains N space-separated integers P_{1}, P_{2}, ..., P_{N}.

------ Output ------

For each test case, output an integer, denoting the minimum number of plates. If it's impossible to take at least M meatballs, print -1.

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

$1 ≤ T ≤ 7777$
$1 ≤ N ≤ 7$
$1 ≤ M, P_{i} ≤ 10^{18}$

----- Sample Input 1 ------
1
4 7
1 2 3 4
----- Sample Output 1 ------
2
----- explanation 1 ------
If he takes 3rd and 4th plates, then we may eat P3 + P4 = 7 meatballs in Las Vegas. This is the only way for eating at least M = 7 meatballs with 2 plates.

输入格式

见题面

输出格式

见题面

样例输入
1 4 7 1 2 3 4
样例输出
2