14 人解决,43 人已尝试。
25 份提交通过,共有 344 份提交。
7.3 EMB 奖励。
单点时限: 10.0 sec
内存限制: 1024 MB
This is an interactive problem. You have to use a flush operation right after printing each line. For example, in C++ you should use the function fflush(stdout)
, in Java — System.out.flush()
, in Pascal — flush(output)
and in Python — sys.stdout.flush()
.
Cuber QQ has a permutation of
Of course, Cuber QQ will not directly tell you the permutation. He will allow you to give at most
All tests are guaranteed random and the number of tests is no more than
The interaction starts with reading one integer
Then you can start the interaction. You can make queries like:
<
if >
if You can ask at most ?
queries.
After printing any query do not forget to print end of line and flush the output. Otherwise, you might get Idleness limit exceeded. To do this, use:
fflush(stdout)
or cout.flush()
in C++;System.out.flush()
in Java;flush(output)
in Pascal;stdout.flush()
in Python;2 > < > > >
? 1 2 ? 1 3 ? 1 4 ? 1 5 ? 1 6 ! 1 3
The example is not in the tests. The permutation of example is
Note that the example interaction contains extra empty lines so that it’s easier to read. The real interaction doesn’t contain any empty lines and you shouldn’t print any extra empty lines as well.
14 人解决,43 人已尝试。
25 份提交通过,共有 344 份提交。
7.3 EMB 奖励。
创建: 2 年,5 月前.
修改: 2 年,5 月前.
最后提交: 2 年,4 月前.
来源: N/A