C. Reimu Hakurei and the Youkai
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Reimu Hakurei is facing $$$n$$$ youkai. The $$$i$$$-th youkai has $$$a_i$$$ health, and Reimu's attack power is $$$x$$$.

While there are $$$k$$$ youkai on the field, Reimu may choose a non-empty proper subset $$$S$$$ of them — so $$$1 \le |S| \lt k$$$ — and attack. Every youkai in $$$S$$$ loses $$$x$$$ health. If a youkai's health becomes $$$0$$$ or less, it is defeated and removed from the field.

If at least one youkai is defeated by this attack, the attack costs $$$0$$$ spell cards. Otherwise, it costs $$$1$$$ spell card.

Reimu wants to leave exactly one youkai alive. Find the minimum total number of spell cards she must spend.

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.

The first line of each case contains two integers $$$n$$$ and $$$x$$$ ($$$2 \le n \le 10^5$$$, $$$1 \le x \le 10^9$$$) — the number of youkai and Reimu's attack power.

The second line of each case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^9$$$) — the initial health of the youkai.

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^5$$$.

Output

For each test case, output a single integer — the minimum number of spell cards Reimu has to spend.

Example
Input
3
2 5
9 10
6 1
1 1 4 5 1 4
6 1
1 9 1 9 8 10
Output
1
0
5
Note

In the first test case, there are only two youkai, so the only valid non-empty proper subset is a single youkai. Reimu may choose the same youkai in two consecutive attacks: the first attack costs $$$1$$$ spell card, and the second one defeats this youkai and costs $$$0$$$ spell cards. Thus, the answer is $$$1$$$.

In the second test case, an optimal sequence of attacks is as follows (the remaining youkai are listed in arbitrary order).

  • Choose one $$$1$$$-health youkai, both $$$4$$$-health youkai, and the $$$5$$$-health youkai. The chosen $$$1$$$-health youkai is defeated, so this attack costs $$$0$$$. Remaining healths: $$$1, 1, 3, 3, 4$$$.
  • Choose one $$$1$$$-health youkai, both $$$3$$$-health youkai, and the $$$4$$$-health youkai. The chosen $$$1$$$-health youkai is defeated, so this attack costs $$$0$$$. Remaining healths: $$$1, 2, 2, 3$$$.
  • Choose one $$$1$$$-health youkai and both $$$2$$$-health youkai. The chosen $$$1$$$-health youkai is defeated, so this attack costs $$$0$$$. Remaining healths: $$$1, 1, 3$$$.
  • Choose both $$$1$$$-health youkai. Both of them are defeated, so this attack costs $$$0$$$. Remaining healths: $$$3$$$.

Since every attack defeated at least one youkai, Reimu spends $$$0$$$ spell cards.