CF1088D Ehab and another another xor problem
题目描述
交互题,系统有两个整数 $(a,b)$,你每次可以询问一组整数 $(c,d)$,系统会回答:
- $1$ 如果 $a\oplus c>b\oplus d$
- $0$ 如果 $a\oplus c=b\oplus d$
- $-1$ 如果 $a\oplus c
输入格式
请见“交互”
输出格式
输出 `! a b` 以输出答案,不要忘了在输出答案后清除缓冲区
### 交互:
输出 `? c d` 以询问,$c$ 和 $d$ 都应该是小于 $2^{30}$ 的非负整数,不要忘了在输出每一次询问后清除缓冲区
你可以用下列操作来清除缓冲区:
- C++:`fflush(stdout)`
- Java:`System.out.flush()`
- Python:`stdout.flush()`
- Pascal:`fflush(stdout)`
- 对于其它语言请参考文档
~~Hacking:~~
~~输出两个用空格隔开的整数 $a$ 和 $b$ 来 hack 别人($0\le a,b
说明/提示
In the sample:
The hidden numbers are $ a=3 $ and $ b=1 $ .
In the first query: $ 3 \oplus 2 = 1 $ and $ 1 \oplus 1 = 0 $ , so the answer is 1.
In the second query: $ 3 \oplus 1 = 2 $ and $ 1 \oplus 2 = 3 $ , so the answer is -1.
In the third query: $ 3 \oplus 2 = 1 $ and $ 1 \oplus 0 = 1 $ , so the answer is 0.
Then, we printed the answer.