{"problem":{"name":"Guess The Number 2","description":{"content":"This is an **interactive task**, where your and the judge's programs interact via Standard Input and Output. You and the judge will follow the procedure below. The procedure consists of phases $1$ and","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc286_f"},"statements":[{"statement_type":"Markdown","content":"This is an **interactive task**, where your and the judge's programs interact via Standard Input and Output.\nYou and the judge will follow the procedure below. The procedure consists of phases $1$ and $2$; phase $1$ is immediately followed by phase $2$.\n(Phase $1$)\n\n*   The judge decides an integer $N$ between $1$ and $10^9$ (inclusive), which is hidden.\n*   You print an integer $M$ between $1$ and $110$ (inclusive).\n*   You also print an integer sequence $A=(A_1,A_2,\\ldots,A_M)$ of length $M$ such that $1 \\leq A_i \\leq M$ for all $i = 1, 2, \\ldots, M$.\n\n(Phase $2$)\n\n*   The judge gives you an integer sequence $B=(B_1,B_2,\\ldots,B_M)$ of length $M$. Here, $B_i = f^N(i)$. $f(i)$ is defined by $f(i)=A_i$ for all integers $i$ between $1$ and $M$ (inclusive), and $f^N(i)$ is the integer resulting from replacing $i$ with $f(i)$ $N$ times.\n*   Based on the given $B$, you identify the integer $N$ that the judge has decided, and print $N$.\n\nAfter the procedure above, terminate the program immediately to be judged correct.\n\n## Constraints\n\n*   $N$ is an integer between $1$ and $10^9$ (inclusive).\n\n## Input And Output\n\nThis is an interactive task, where your and the judge's programs interact via Standard Input and Output.\n(Phase $1$)\n\n*   First, print an integer $M$ between $1$ and $110$ (inclusive). It must be followed by a newline.\n\n$M$\n\n*   Then, print a sequence $A=(A_1,A_2,\\ldots,A_M)$ of length $M$ consisting of integers between $1$ and $M$ (inclusive), with spaces in between. It must be followed by a newline.\n\n$A_1$ $A_2$ $\\ldots$ $A_M$\n\n(Phase $2$)\n\n*   First, an integer sequence $B=(B_1,B_2,\\ldots,B_M)$ of length $M$ is given from the input.\n\n$B_1$ $B_2$ $\\ldots$ $B_M$\n\n*   Find the integer $N$ and print it. It must be followed by a newline.\n\n$N$\n\nIf you print something illegal, the judge prints `-1`. In that case, your submission is already considered incorrect. Since the judge program terminates at this point, it is desirable that your program terminates too.\n\n[samples]\n\n## Notes\n\n*   **After each output, add a newline and then flush Standard Output. Otherwise, you may get a TLE verdict.**\n*   **If an invalid output is printed during the interaction, or if the program terminates halfway, the verdict will be indeterminate.**\n*   After you print the answer (or you receive `-1`), immediately terminate the program normally. Otherwise, the verdict will be indeterminate.\n*   Note that an excessive newline is also considered an invalid input.","is_translate":false,"language":"English"}],"meta":{"iden":"abc286_f","tags":[],"sample_group":[],"created_at":"2026-03-03 11:01:14"}}