You are given an array A of N non-negative integers. Find the number of pairs of indices (i, j) (1≤i<j≤N), such that A[i]⊕j=A[j]⊕i, where ⊕ is the bitwise XOR operator.
Input format
The first line contains a single integer T denoting the number of test cases.
For each test case, the first line contains a single integer N denoting the size of the array A. The next line contains N space-seperated integers denoting the elements of the array.
Output format
The output must contain a single integer, that is the number of pairs described in the statement.
Constraints
1≤T≤10
1≤N≤2×105
0≤A[i]≤109
It is guaranteed that the sum of N does not exceed 2×105 over all test cases.
In the first test case, it can be shown that no pairs satisfy the condition.
In the second test case, the pairs (1, 3) and (2, 4) satisfy the condition, as A[1]⊕3=A[3]⊕1=0 and A[2]⊕4=A[4]⊕2=0.