B1. Xor Pairs (Easy Version)
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given an array of $$$n$$$ integers (a1, a2, a3, ....... an)

You have to find the number of pairs such that a[i] xor a[j] = a[i]

Input

First line has a single integer $$$t$$$, number of tests [1 <= $$$t$$$ <= 10]

First line of each test has a single integer $$$n$$$, size of array [1 <= $$$n$$$ <= 100]

Second line of each test has $$$n$$$ integers, the array elements [0 <= $$$a[i]$$$ <= 1e9]

It is guaranteed that sum of n among all tests do not exceed 100

Output

For each test, print a single integer, the number of pairs

Example
Input
3
5
0 1 0 2 0
7
0 1 1 2 3 0 1
4
0 0 0 0
Output
15
14
16