[Solution] Simple XOR CodeChef Solution | CodeChef Problem Solution 2022
You are given two integers and . Output any four distinct integers between and (inclusive) such that their bitwise XOR
is zero.
More formally, output any four integers such that:
- if and only if
Solution Click Below:- CLICK HERE
If more than one such quadruple exists, you may output any of them. If no such quadruple exists, print instead.
Input Format
- The first line of input will contain a single integer , the number of test cases. The description of the test cases follows.
- Each test case consists of a single line of input, containing two space-separated integers .
Output Format
For each testcase, output any four distinct integers between and such that their bitwise XOR
is zero, or output in case no such quadruple of four distinct integers exists.
Constraints
- , so there are at least four distinct integers in the range.
No comments:
Post a Comment