Alice has an array
of length . She is interested in finding the number of pairs such that and.
represents the Bitwise XOR operator.
represents the Bitwise AND operator.
Input Format
- The first line of input will contain an integer
- .
Output Format
For each test case, output the number of pairs
such that and.
Constraints
- .
Sample Input 1
2
4
1 1 2 3
4
1 2 3 4
Sample Output 1
2
1
Explanation
Test case
: The two pairs of indices satisfying the condition are and, because
Test case
: The only pair of indices satisfying the condition is .
ConversionConversion EmoticonEmoticon