Andrew has a special computer that contains some very special content. He also has an appropriately special way of unlocking his computer. To get in, he needs a password
Are you able to get into Andrew's computer?
Interaction
This is an interactive problem. In the first line, you will receive the integer
Now, you may ask for hints from the computer. To ask for a hint, print ? i j
to ask for the bitwise AND value of
The judge will respond with the answer, or -1
if your output was invalid or if you exceeded the hint limit. Exit immediately after receiving -1
or else you will receive an arbitrary verdict.
To guess the password, print ! P_1, P_2, ... P_n
and terminate your program. Note that guessing does not count as one of the
Note: This interactor is not adaptive, i.e.
Subtask 1 [30%]
Subtask 2 [30%]
Subtask 3 [40%]
Sample Interaction
>>>
denotes your output; don't actually print this out.
3
>>> ? 1 2
0
>>> ? 1 3
2
>>> ? 2 3
1
>>> ! 2 1 3
Explanation for Sample Interaction
The answer is 2 1 3
. The first hint asks for
Comments