#x1014. CF1770F Koxia and Sequence
CF1770F Koxia and Sequence
Koxia and Sequence
题面翻译
给定非负整数 ,对于所有满足 ,的序列 。求 的异或和。
题目描述
Mari has three integers , , and .
Call an array of non-negative integers good if it satisfies the following conditions:
- , and
- , where denotes the bitwise OR operation.
The score of a good array is the value of , where 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 instead.
输入格式
The first line of input contains three integers , and ( , , ).
输出格式
Output a single integer — the total bitwise XOR of the scores of all good arrays.
样例 #1
样例输入 #1
3 5 3
样例输出 #1
2
样例 #2
样例输入 #2
100 0 100
样例输出 #2
0
样例 #3
样例输入 #3
79877974817 749875791743978 982783
样例输出 #3
64
提示
In the first test case, there are good arrays totally as follows.
- , , , , and — the score is ;
- , and — the score is ;
- , and — the score is .
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 .