You are given a positive integer array of length and queries. In each query, given an positive integer find the length of the longest subsequence with sum of elements less than ?
INPUT FORMAT
The first line contains an integer, - denoting the number of test cases.
The first line of each test case contains two integers and - denoting the length of the array , and the number of queries.
The second line of each test case contains positive integers — elements of .
Then lines follow, each line contains a single positive integer for corresponding query.
OUTPUT FORMAT
For each test case, print the answer for each query in a new line.
Constraints
, both sum of and sum of across all test cases <=
For first query K=8, maximum length is 2 with subsequence [5,2].
For second query K=2, there is no subsequence with sum < 2.
For third query K=20, maximum length is 3 with subsequence [5, 7, 2].