E. Zero Hour
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

George enjoys playing old classic games. One day, he started playing the popular game called "General Zero Hour" on his computer. While playing the game, he encountered a problem and had to stop.

In the game, George has a certain number of soldiers, denoted by $$$n$$$. Each soldier is assigned a power level, denoted by $$$a_i$$$. Now, George needs to divide these soldiers into groups, while adhering to the following two conditions:

  • Each soldier should belong to exactly one group.
  • If two soldiers $$$x$$$ and $$$y$$$ belong to the same group, then the Bitwise XOR value of their power levels should be greater than or equal to the minimum power level between them, In other words ($$$a_x$$$ $$$\oplus$$$ $$$a_y$$$) should be greater than or equal to $$$min(a_x, a_y)$$$.
George wants to minimize the number of groups required to satisfy these conditions because he is too lazy to name all the groups.

Can you help George with this problem so he can continue playing?

Input

The first line contains the number of test cases $$$t$$$ $$$( 1 \le t \le 10^{5} )$$$. A description of the test cases follows.

The first line of each test case contains a single integer $$$n$$$ $$$( 1 \le n \le 10^{5} )$$$ indicating the number of soldiers.

The second line of each test case contains $$$n$$$ integers $$$a_1,a_2,...,a_n$$$ $$$( 0 \le a_i \lt 2^{60} )$$$ , $$$a_i$$$ indicates the power of the soldier $$$i$$$ .

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

Output

For each test case, print the minimum number of groups.

Example
Input
1
6
1 2 3 4 5 6
Output
3