P17418 [CodeChef] EXISTENCEOFX
提高
题目描述

You are given non-negative integers A, B and C.

Does there exist a non-negative integer X such that $A \oplus X+ B \oplus X = C \oplus X$?

As $a reminder, \oplus$ denotes the [bitwise XOR operation].

------ Input Format ------

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • The only line of each test case contains three space-separated non-negative integers A, B and C.

------ Output Format ------

For each test case, print on a new line the answer: YES if valid X exists, and NO otherwise.

Each character of the output may be printed in either uppercase or lowercase, i.e, the strings Yes, YES, yes, yEs will all be treated as identical.

------ Constraints ------

$1 ≤ T ≤ 10^{5}$
$0 ≤ A, B, C < 2^{27}$

----- Sample Input 1 ------
5
2 5 7
2 3 13
7 0 7
2 7 6
1 6 6

----- Sample Output 1 ------
YES
NO
YES
YES
YES

----- explanation 1 ------
Test case $1$: $X=0$ satisfies the equation.

Test case $2$: It can be proved that there does not exist a non-negative integer $X$ which satisfies the equation.

Test case $3$: $X=0$ satisfies the equation.

Test case $4$: $X=3$ satisfies the equation.

Test case $5$: $X=1$ satisfies the equation.

输入格式

见题面

输出格式

见题面

样例输入
5 2 5 7 2 3 13 7 0 7 2 7 6 1 6 6
样例输出
YES NO YES YES YES