#D8344. op Game
op Game
op Game
This is a reactive problem.
Problem statement
There are non-negative integers of bits, .
Alice confirms and leaves a note for bits for Charlie.
Bob checks and leaves a note for bits for Charlie.
Charlie answers of questions based on the information in the notes .
The th question is represented by the non-negative integer of bits, and Charlie has the bitwise exclusive OR of and equal to . Answer such as.
Consider a strategy that can answer or more of the questions correctly.
Constraint
- $ a_1, \ ldots, a_ {100}, b_1, \ ldots, b_ {100}, c_1, \ ldots, c_ {100} $ is given in decimal notation and consists of
0
,1
A string of length . - are different from each other.
- are different from each other.
- are different from each other.
- For , there exists such that the bitwise exclusive OR of and is .
Input / output and judge
Your program runs times for test cases.
The execution gives information to Alice in the following input format:
Alice
The string Alice
is always given on the line. In this case, after receiving all the input, the character string of length consisting of 0
and 1
must be output, and the program must be terminated immediately.
The execution gives information to Bob in the following input format:
Bob
The string Bob
is always given on the line. In this case, after receiving all the input, the string of length consisting of 0
and 1
must be output, and the program must be terminated immediately.
The run will give Charlie questions and notes in the following input format:
Charlie
The string Charlie
is always given on the line. After receiving all the input, integers or more and or less and or more and or less integers The output should be in the following format and the program should be terminated immediately.
The judge checks for to see if the bitwise exclusive OR of and matches If it is or more, it is judged as a correct answer, otherwise it is judged as an incorrect answer.
Even if there is an invalid value or output in an invalid format, it will be an incorrect answer.
Note
- Flush standard output for each output. Otherwise, it can be a TLE.
- EOF is given at the end of any type of input.
- The process may not make any communication other than as specified above.
Input / output example 1
The following is an example of dialogue when , although the number of bits, the number of non-negative integers, and the number of questions are different. ..
Answer Program Output | Input to Answer Program | Description |
---|---|---|
The answer program (Alice) is executed | ||
Alice | ||
Alice gets information about | ||
Alice leaves a note | ||
Execution of the answer program (Alice) is completed, and a new answer program (Bob) is executed. | ||
Bob | ||
Bob gets information about | ||
Bob leaves a note | ||
Execution of the answer program (Bob) is completed, and a new answer program (Charlie) is executed. | ||
Charlie | ||
Charlie gets information, then question information | ||
Charlie is for the second question , for the second question |
Example
Input
Output
inputFormat
Input /
outputFormat
output and judge
Your program runs times for test cases.
The execution gives information to Alice in the following input format:
Alice
The string Alice
is always given on the line. In this case, after receiving all the input, the character string of length consisting of 0
and 1
must be output, and the program must be terminated immediately.
The execution gives information to Bob in the following input format:
Bob
The string Bob
is always given on the line. In this case, after receiving all the input, the string of length consisting of 0
and 1
must be output, and the program must be terminated immediately.
The run will give Charlie questions and notes in the following input format:
Charlie
The string Charlie
is always given on the line. After receiving all the input, integers or more and or less and or more and or less integers The output should be in the following format and the program should be terminated immediately.
The judge checks for to see if the bitwise exclusive OR of and matches If it is or more, it is judged as a correct answer, otherwise it is judged as an incorrect answer.
Even if there is an invalid value or output in an invalid format, it will be an incorrect answer.
Note
- Flush standard output for each output. Otherwise, it can be a TLE.
- EOF is given at the end of any type of input.
- The process may not make any communication other than as specified above.
Input / output example 1
The following is an example of dialogue when , although the number of bits, the number of non-negative integers, and the number of questions are different. ..
Answer Program Output | Input to Answer Program | Description |
---|---|---|
The answer program (Alice) is executed | ||
Alice | ||
Alice gets information about | ||
Alice leaves a note | ||
Execution of the answer program (Alice) is completed, and a new answer program (Bob) is executed. | ||
Bob | ||
Bob gets information about | ||
Bob leaves a note | ||
Execution of the answer program (Bob) is completed, and a new answer program (Charlie) is executed. | ||
Charlie | ||
Charlie gets information, then question information | ||
Charlie is for the second question , for the second question |
Example
Input
Output
样例