Question
Budget Allotment

This year's annual budget involved a discussion on N sectors where the ith sector was initially allocated an amount Ai​.
It was later realised that a minimum budget of X is required by each sector. Allocation can be transferred from sector i to any sector j only if the final allocation for sector i remains at least X.
Find the maximum number of sectors that can meet the minimum required budget of X after possible transfers?

Input
The first line of input will contain a single integer T, denoting the number of test cases.
Each test case consists of multiple lines of input.
The first line of each test case contains two space-separated integers N and X - the number of sectors and the minimum budget requirement of each sector, respectively.
The next line consists of N space-separated integers A1, A2, ..., AN, denoting the initial budget allocated to each sector.

Constraints
1 ≤ T ≤ 105
1 ≤ N ≤ 105
1 ≤ X, Ai ≤ 105
The sum of N over all test cases won't exceed 2x105
Output
For each test case, output on a new line, the maximum number of sectors that can meet the minimum required budget of X after possible transfers.
Example
Input
2
3 2
2 1 3
3 3
1 1 2
Output
3
0
Explanation
Test case 1:  The minimum requirement for each sector is 2. Since sector 3 was allocated 3 units initially, 1 unit can be transferred to sector 2, leading to a final allocation of [2, 2, 2]. Thus,
3 sectors have the minimum required budget.
Test case 2: The minimum requirement for each sector is 3. Since no sector has surplus budget, no transfers would take place. Thus, 0 sectors have the minimum required budget.

Online