Greedy Algorithms
Being greedy for Water
You are given container full of water. Container can have limited amount of water. You also have N bottles to fill. You need to find the maximum numbers of bottles you can fill.
Input: First line contains one integer, T, number of test cases. First line of each test case contains two integer, N and X, number of bottles and capacity of the container. Second line of each test case contains N space separated integers, capacities of bottles.
Output: For each test case print the maximum number of bottles you can fill.
Last updated
Was this helpful?