{"problem":{"name":"Odd or Even","description":{"content":"This is an **interactive task** (where your program and the judge interact via Standard Input and Output). You are given an integer $N$ and an **odd number** $K$.   The judge has a hidden length-$N$ s","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc313_d"},"statements":[{"statement_type":"Markdown","content":"This is an **interactive task** (where your program and the judge interact via Standard Input and Output).\nYou are given an integer $N$ and an **odd number** $K$.  \nThe judge has a hidden length-$N$ sequence $A = (A_1, A_2, \\dots, A_N)$ consisting of $0$ and $1$.\nWhile you cannot directly access the elements of sequence $A$, you are allowed to ask the judge the following query at most $N$ times.\n\n*   Choose distinct integers $x_1, x_2, \\dots$, and $x_K$ between $1$ and $N$, inclusive, to ask the parity of $A_{x_1} + A_{x_2} + \\dots + A_{x_K}$.\n\nDetermine $(A_1, A_2, \\dots, A_N)$ by at most $N$ queries, and print the answer.  \nHere, **the judge is adaptive**. In other words, the judge may modify the contents of $A$ as long as it is consistent with the responses to the past queries.  \nTherefore, your program is considered correct if the output satisfies the following condition, and incorrect otherwise:\n\n*   your program prints a sequence consistent with the responses to the queries so far, and that is the only such sequence.\n\n## Constraints\n\n*   $1 \\leq K \\lt N \\leq 1000$\n*   $K$ is odd.\n*   $A_i$ is $0$ or $1$.\n\n## Input And Output\n\nThis is an **interactive task** (where your program and the judge interact via Standard Input and Output).\nFirst of all, receive $N$ and $K$ from Standard Input.\n\n$N$ $K$\n\nThen, repeat asking queries until you can uniquely determine $(A_1, A_2, \\dots, A_N)$.  \nEach query should be printed to Standard Output in the following format, where $x_1, x_2, \\dots$, and $x_K$ are $K$ distinct integers between $1$ and $N$, inclusive.\n\n$?$ $x_1$ $x_2$ $\\dots$ $x_K$\n\nThe response to the query is given from Standard Input in the following format.\n\n$T$\n\nHere, $T$ denotes the response to the query.\n\n*   $T$ is `0` when $A_{x_1} + A_{x_2} + \\dots + A_{x_K}$ is even, and\n*   $T$ is `1` when $A_{x_1} + A_{x_2} + \\dots + A_{x_K}$ is odd.\n\nHowever, if $x_1, x_2, \\dots$ and $x_K$ do not satisfy the constraints, or the number of queries exceeds $N$, then $T$ is `-1`.\nIf the judge returns `-1`, your program is already considered incorrect, so terminate the program immediately.\nWhen you can determine all the elements of $A$, print those elements in the following format, and terminate the program immediately.\n\n$!$ $A_1$ $A_2$ $\\dots$ $A_N$\n\n[samples]\n\n## Notes\n\n*   **Print a newline and flush Standard Output at the end of each message. Otherwise, you may get a TLE verdict.**\n*   **The verdict will be indeterminate if there is malformed output during the interaction or your program quits prematurely.**\n*   Terminate the program immediately after printing the answer, or the verdict will be indeterminate.\n*   The judge for this problem is adaptive. This means that the judge may modify the contents of $A$ as long as it is consistent with the responses to the past queries.","is_translate":false,"language":"English"}],"meta":{"iden":"abc313_d","tags":[],"sample_group":[],"created_at":"2026-03-03 11:01:14"}}