Given an array \(A\) of size \(N\), you could choose some non-negative number \(X\) and change every element of the given array to \(A_i = A_i \oplus X\)
Here, \(\oplus\) denotes the bitwise XOR operation.
Print the number of total possible values of \(X\) for which bitwise OR of every element of the array would be minimum.
Input format
- The first line contains \(T\) denoting the number of test cases.
- The first line of each test case contains integers \(N\), denoting the size of the array \(A\).
- The next line contains \(N\) integers.
Output format
Print the number of total possible values of \(X\) for which bitwise OR of every element of the array would be minimum.
Constraints
\(1 \leq T \leq 5000\)
\(1 \leq N \leq 10^5\)
\(0 \leq A_i \leq 10^9\)
The sum of \(N\) over all test cases does not exceed \(2 \cdot 10^5\)
Here minimum possible bitwise OR of the array is 5.
All possible values for 'X' are 0,1,4,5.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor