|All-time Popular Problems|
|Construct Tree from Inorder & Preorder|
|Sum of two large numbers|
|Level order traversal in spiral form|
|Spirally traversing a matrix|
|Angle between hour and minute hand|
|Binary Tree to DLL|
|Smallest Positive missing number|
|Height of Binary Tree|
|Largest Number formed from an Array|
You are given three numbers N, S and X. You have to tell whether it is possible to construct such sequence A of length N, where each Ai>=0 for 1<=i<=N and the sum of all numbers in a sequence is equal to S, and the XOR of sequence equals to X.
First line of input contains T denoting number of test cases.
First line of each test case contains three integers N, S and X, as described above.
For each test case output a single line containing “Yes” (without quotes), if it is possible to have such a sequence and “
No”, if it is not possible to have such a sequence.
1 3 2
2 10 0
In the second test case, we can use the sequence "5 5", because the XOR of all elements will be 0, and sum 10