[Solution] Find A, B, C CodeChef Solution | Codechef Solution
Chef has hidden numbers and such that .
Let be a function such that . Here denotes the bitwise XOR operation.
Given the values of , determine the values of and .
It is guaranteed that at least one tuple exists for the given input. If there are multiple valid tuples of , print any one.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of multiple lines of input.
- The first line of each test case contains a single integer denoting the upper bound on the values of .
- Next line contains space-separated integers denoting .
Output Format
For each test case, output on a new line, three space-separated integers, the values of and .
Pass the Exam CodeChef Solution
Chef and Candies CodeChef Solution
Journey of the Knight CodeChef Solution
Slow Solution CodeChef Solution
Game of Piles Version 1 CodeChef Solution
Find A, B, C CodeChef Solution
Largest Square in the garden CodeChef Solution
Game of Piles Version 2 CodeChef Solution
If there are multiple valid tuples of , print any one.
Constraints
- Sum of over all test cases does not exceed
No comments:
Post a Comment