Jump
시간 제한2초메모리 제한512 MB
일치하는 비트 수에 따라 n, n/2, 0을 돌려주는 질의로 숨겨진 비트 문자열을 알아낸다.
문제
Consider a toy interactive problem which is defined as follows. You know an integer and there is a hidden bit string of length . The only thing you may do is to present the system a bit string of length , and the system will return the number --- the number of bits which coincide in and at the corresponding positions. The name of problem stems from the fact that this problem is simpler to explain when , so that the problem turns into maximization () of the number of ones ().
When is even, there is a similar (but harder) interactive problem called . The simplest way to describe the is by using : \begin{equation\*} Jump(Q) = \begin{cases} OneMax(Q) & \text{if } OneMax(Q) = n \text{ or } OneMax(Q) = n/2;\\\ 0 & \text{otherwise}. \end{cases} \end{equation\*}
Basically, the only nonzero values of which you can see with are (which means you've found the hidden string ) and .
Given an even integer --- the problem size, you have to solve the problem for the hidden string by making interactive queries. Your task is to eventually make a query such that .
입력
The first line of the input stream contains an even number (). The next lines of the input stream consist of the answers to the corresponding queries. Each answer is an integer --- either , , or . Each answer is on its own line.
출력
To make a query, print a line which contains a string of length which consists of characters 0 and 1 only. Don't forget to put a newline character and to flush the output stream after you print your query.