AdvancedRating 1600
Total XOR of All Pairs
Print the sum of aᵢ XOR aⱼ over all pairs i < j.
Input
n, then n non-negative integers below 2³⁰.
Output
One integer.
Sample 1
Input
3 7 3 5
Output
12
Sample 2
Input
1 9
Output
0
Output appears heren, then n non-negative integers below 2³⁰.
One integer.
3 7 3 5
12
1 9
0
Output appears here