{"problem":{"name":"Harmonic Mean","description":{"content":"Determine whether there is a length-$N$ sequence of positive integers $A=(A_1,A_2,\\dots,A_N)$ that satisfies all of the following conditions, and if it exists, construct one. *   $\\sum_{i=1}^{N} \\fra","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc163_c"},"statements":[{"statement_type":"Markdown","content":"Determine whether there is a length-$N$ sequence of positive integers $A=(A_1,A_2,\\dots,A_N)$ that satisfies all of the following conditions, and if it exists, construct one.\n\n*   $\\sum_{i=1}^{N} \\frac{1}{A_i} = 1$\n*   All elements of $A$ are distinct.\n*   $1 \\le A_i \\le 10^9(1 \\le i \\le N)$\n\nYou are given $T$ test cases. Find the answer for each of them.\n\n## Constraints\n\n*   $1 \\le T \\le 500$\n*   $1 \\le N \\le 500$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$T$\n$\\mathrm{case}_1$\n$\\mathrm{case}_2$\n$\\vdots$\n$\\mathrm{case}_T$\n\nHere, $\\mathrm{case}_i$ is the $i$\\-th test case. Each test case is given in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc163_c","tags":[],"sample_group":[["2\n3\n5","Yes\n2 3 6 \nYes\n3 4 5 6 20 \n\nIn the first test case, $N=3$.\n$A=(2,3,6)$ is valid because $\\frac{1}{2} + \\frac{1}{3} + \\frac{1}{6} = 1$ and it satisfies all other conditions.\nIn the second test case, $N=5$.\n$A=(3,4,5,6,20)$ is valid because $\\frac{1}{3} + \\frac{1}{4} + \\frac{1}{5} + \\frac{1}{6} + \\frac{1}{20} = 1$ and it satisfies all other conditions.\nNote that, for example, $A=(5,5,5,5,5)$ satisfies the first and third conditions, but it is invalid because it contains duplicated elements."]],"created_at":"2026-03-03 11:01:13"}}