| SDU Open 2021 Fall |
|---|
| Закончено |
Hello! Today we are going to play the game 'Guess the expression'. I have a hidden arithmetic expression of a specific format (a op1 b op2 c). I guarantee you that op1, op2 $$$\in$$$ $$$\{$$$ '+', '-', '*' $$$\}$$$.
Some examples of expressions I could have hidden: a+b*c, a-b-c, a*b-c. Your game objective is to guess my expression by asking queries. You can give me values of the variables ($$$a$$$, $$$b$$$, $$$c$$$) and I will give you back the result of the expression with these variables.
The only two rules are:
Will you play or will you resign?
To ask a query print a single line following the format ? a b c. The integers should satisfy the constraint $$$0 \le a, b, c \le 1$$$. You will then have to read a single integer which will be my answer to your query.
Your program should not ask more than two queries.
To guess an expression print a line in format ! s. Your program has to immediately terminate after printing this line, otherwise you may get unpredictable verdicts.
Remember to flush the output every time. Use:
-1 1
? 0 0 1 ? 1 1 0 ! a*b-c
| Название |
|---|


