#P7207. [COCI 2019/2020 #3] Sob
[COCI 2019/2020 #3] Sob
Description
You are given two positive integers .
Now you need to combine numbers from the sets and , and select ordered pairs . The requirements are:
- , , and ( denotes the bitwise AND operation).
- All are pairwise distinct, and all are pairwise distinct.
Input Format
Input two integers .
Output Format
Output a total of lines.
On the -th line, output two integers , where .
It can be proven that a solution satisfying the conditions always exists.
1 3
0 3
3 5
0 7
1 5
2 6
5 10
0 12
1 13
2 10
3 11
4 14
Hint
Constraints and Notes
| Subtask | Score | Constraints and Notes |
|---|---|---|
| is an integer power of | ||
| is an integer power of | ||
| None |
For of the testdata, .
Explanation
This problem uses a self-written Special Judge. You are welcome to hack it (you can send a private message or post directly).
The scoring of this problem follows the original COCI problem settings, with a full score of .
This problem is translated from COCI2019-2020 CONTEST #3 T5 Sob .
Translated by ChatGPT 5
京公网安备 11011102002149号