시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
3 초 | 512 MB | 38 | 18 | 16 | 51.613% |
This is an interactive problem.
Jury has prepared n non-empty integer arrays a1, a2, . . . , an. Each array consists of at most 10 positive integers not exceeding 1000. The elements of each array are pairwise distinct.
You can make queries of the following kind: choose several indices q1, q2, . . . , qm, where 1 ≤ m ≤ n and 1 ≤ qi ≤ n. These indices do not have to be distinct. The testing system tells you the contents of arrays aq1, aq2, . . . , aqm in the same order. However, these contents are concatenated without any delimeters.
Your task is to find the contents of all n arrays.
First, the testing system writes the integer n — the number of arrays (1 ≤ n ≤ 1000). Your solution shall print requests of two types:
Don’t forget to flush the output after each request!
Your solution must issue exactly one request of the second type. It must be the last request, and the solution must terminate gracefully after issuing it.
Your solution is allowed to issue at most 20 requests of the first type.
3 5 1 1 2 2 1 4 1 2 1 1 2 1 2
? 3 1 2 3 ? 3 1 3 1 ? 1 2 ! 1 1 2 1 2 2 2 1
ICPC > Regionals > Northern Eurasia > North-Western Russia Regional Contest > NEERC Northern Subregional 2018 I번