#P7627. [COCI 2011/2012 #1] X3
[COCI 2011/2012 #1] X3
Description
Given a sequence of length , find the sum of the pairwise XOR of all elements in the sequence.
Input Format
The first line contains a positive integer .
The next lines each contain a positive integer .
Output Format
Output one integer on a single line, representing the sum after taking XOR over all unordered pairs.
2
19
10
25
3
7
3
5
12
5
9
13
1
9
6
84
Hint
Sample 2 Explanation
, , , and , so the answer is .
Constraints
For of the testdata, and .
Notes
The score of this problem follows the original COCI setting, with a full score of .
This problem is translated from COCI2011-2012 CONTEST #1 T3 X3.
Translated by ChatGPT 5
京公网安备 11011102002149号