Good Bye 2022: 2023 is NEAR |
---|
Finished |
Mari has three integers $$$n$$$, $$$x$$$, and $$$y$$$.
Call an array $$$a$$$ of $$$n$$$ non-negative integers good if it satisfies the following conditions:
The score of a good array is the value of $$$a_1 \oplus a_2 \oplus \ldots \oplus a_n$$$, where $$$\oplus$$$ denotes the bitwise XOR operation.
Koxia wants you to find the total bitwise XOR of the scores of all good arrays. If there are no good arrays, output $$$0$$$ instead.
The first line of input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \leq n < 2^{40}$$$, $$$0 \leq x < 2^{60}$$$, $$$0 \leq y < 2^{20}$$$).
Output a single integer — the total bitwise XOR of the scores of all good arrays.
3 5 3
2
100 0 100
0
79877974817 749875791743978 982783
64
In the first test case, there are $$$12$$$ good arrays totally as follows.
Therefore, the total bitwise xor of the scores is $$$\underbrace{1 \oplus \ldots \oplus 1}_{9\text{ times}} \oplus 3 \oplus 3 \oplus 3 = 2$$$.
In the second test case, there are no good sequences. The output should be $$$0$$$.
Name |
---|