单点时限: 1.0 sec
内存限制: 1024 MB
Cuber QQ is thinking of a colourful integer between $−10^9$ and $10^9$ ; can you guess what it is?
Given a guess, Cuber QQ will tell you whether it is too low, too high, or correct. But you only get $32$ guesses per game, so use them wisely!
For each game, your submission should output guesses for the correct number, in the form of an integer between $−10^9$ and $10^9$ on a line on its own.
After each guess, your submission should read a response on standard input. This response is a line with one of the following:
small if your guess is smaller than the number Cuber QQ is thinking of;
equal if you guess is correct; or
After guessing correctly, you should exit immediately. Within each game, if you guess incorrectly $32$ times, you won’t get any more chances.
Note: Do not forget to flush output buffers after each write. Use
fflush in C,
endl in C++,or
sys.stdout.flush() in Python.
You might get “Idleness Limit Exceeded” as a verdict, which means that your program is waiting for an input that is never arriving.
2 -3 -1 0
big small small equal