题目描述
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 A_{i}>=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.
Example 1:
Input:
N = 2
S = 10
X = 0
Output: Yes
Explanation:
We can use the sequence "5 5", because the
XOR of all elements will be 0, and sum 10
Example 2:
Input:
N = 1
S = 3
X = 2
Output: No
Your Task:
You don't need to read input or print anything. Your task is to complete the function toughProblem() which takes the integer N, integer S, and integer X as input parameters and returns the “Yes” (without quotes) if it is possible to have such a sequence and “No” if it is not possible to have such a sequence.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
CONSTRAINTS
1 ≤ N ≤ 10^{5}
0 ≤ S,X ≤ 10^{9}
输入格式
见题面
输出格式
见题面