2019 年 “游族杯” 上海市高校程序设计邀请赛热身赛

D. Colourful Number
PDF 题面可用
你可以在这里下载。

单点时限: 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

  • big otherwise.

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, flush or 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.

样例

Input
2
-3
-1
0
Output
big
small
small
equal