题目描述
Rohan is programmer. He designed a game called X-Game. In this game, there are N number of soldiers, represented in terms of their powers. The algorithm of this game arranges all soldiers in all possible different groups.
Every group will fight among the soldiers of the same group and after the fight ends, the remaining power of all the groups will be added and that will be the final score of the player.
NOTE: The fight will performs the XOR operation between the power of the soldiers. Every group is unique.
INPUT:
An integer T, denoting the number of test-cases.
For each test-case contains two lines, first line will contains an integer N followed by second line containing N integers separated by a single space.
OUTPUT:
T lines, i th line containing the output of the i th testcase.
Constraints:
1 ≤ T ≤ 5
1 ≤ N ≤ 10^5
0 ≤ A[i] ≤ 10^9
SAMPLE INPUT
1
3
1 2 3
SAMPLE OUTPUT
12
输入格式
见题面
输出格式
见题面