|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||256 MB||0||0||0||0.000%|
This is an interactive problem.
There are competitions where you can take the top line of the standings and get a diploma for place zero, and the team below gets the cup for the first place.
Let us generalize this case. Suppose that $n$ guys participated in the competition, there are no ties, and the participants' places are consecutive integers. There are first, second, and third places, but the top line of the standings can correspond to a place smaller than the first. Suppose that such a competition was completed and you were asked to find out each person's final place. You can ask the participants about what place they took compared to other participants. However, participants will not always answer your questions. It depends who and whom you ask about, namely:
Determine the places of all participants.
At the beginning, the jury program prints one line containing one integer $n$ ($3 \leq n \leq 1000$). It is guaranteed that there are first, second, and third places, but the top line of the standings can correspond to a place smaller than the first. To ask questions, the parcitipants are numbered from $1$ to $n$ in some order which is not relevant to their places.
After that, the participant program must interact with the jury program by printing the commands in one of the following formats:
+"' if the participant number $a$ said that he performed better than the participant number $b$, "
-" if he said that he performed worse, and "
?" if he decided not to answer.
Your solution can make at most 14,000 queries.
6 ? ? ? + ? ? ? ? + ? ? + - -
? 6 5 ? 6 4 ? 5 6 ? 5 4 ? 5 1 ? 5 3 ? 4 5 ? 4 6 ? 4 3 ? 4 2 ? 1 2 ? 2 1 ? 3 4 ? 3 1 ! 0 -1 4 3 2 1
In each test for this problem, the places of all participants are fixed in advance and do not depend on your queries in any way.