C. Iyaad's Birthday
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Iyad has a cat called Thlooj, and many of the cats in his neighborhood look like him, so on his birthday we decided we want to DNA a bunch of cats and see how many are related to him.

Thlooj and his brother M3m3

They tested $$$n$$$ cats, and each cat's DNA was represented by an integer $$$a_i$$$. We say a cat is related to Thlooj if they have any mutual ones in their binary representation, more specifically if $$$a_i$$$ $$$\&$$$ $$$D \gt 0$$$ where $$$D$$$ is Thlooj's DNA.

How many cats are related to Thlooj?

Note that $$$\&$$$ is the bitwise AND operator.

Input

The first line of the input contains an integer $$$t$$$ $$$(1 \leq t \leq 10^3)$$$ – the number of testcases.

The first line of each case contains two integers $$$n$$$ and $$$D$$$ $$$(1 \leq n \leq 2\cdot10^5; 1 \leq D \leq 10^9)$$$ – the number of cats they tested and Thlooj's DNA.

The second line of each case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(0 \leq a_i \leq 10^9)$$$.

It's guaranteed that the sum of $$$n$$$ over all test cases doesn't exceed $$$10^6$$$.

Output

For each test case, print one integer, the number of cats related to Thlooj.

Example
Input
2
4 12
1 6 8 5
3 11
1 24 66
Output
3
3