Inaho is given an array
Inaho wants to play a game with you! He wants you to recreate the array. Because he knows this is impossible, he will allow you to ask him some questions. In particular, you are to ask him
Tell Inaho what his array
Input Specification
Inaho will provide you the integer
Interaction
You may then ask questions. To ask a question, you must use the form Q x
. Note that
To tell Inaho the array A p
.
For example, if
You are allowed to ask Inaho a maximum of
After each question or the answer, you may need to flush stdout
. You do not need to flush if you are using C++, Java, or Python 2/3. In other languages, such as Pascal, you will need to flush stdout
for the interactor to receive your output.
Note 1: Up to
Output Specification
To tell Inaho the array A p
, where
Constraints
Subtasks
Subtask 1 [10%]
Subtask 2 [30%]
Subtask 3 [60%]
Note that these are not explicit subtasks. You will receive the specified percentage of points depending on which subtask you fall in. For example, using
Sample Interaction
>>>
denotes your output; don't actually print this out.
3
>>> Q 0.000000000000
0.000000000000000
>>> Q 3.01
-1.239969287666227
>>> A 13
Comments
Stuck from getting IR with python 2/3 but I can't seem to reproduce the issue on multiple different environments, can someone help guide me in the right direction?
Do you flush your output?
Same IR response after flushing for every interaction unfortunately, that didn't seem to be the case.
EDIT: Apparently flushing before an interaction is also needed? That seemed to cure the IR response.