#P3917. 异或序列
异或序列
Description
Given a sequence , compute
$$\sum_{1\le i\le j\le N} A_i\oplus A_{i+1}\oplus\cdots\oplus A_j$$where denotes bitwise XOR.
Input Format
The first line contains an integer .
The second line contains integers .
Output Format
Output a single integer: the value of the expression.
2
1 2
6
Hint
- For of the testdata, .
- For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号