🏑 index : github.com/captn3m0/codechef.git

---
{"category_name":"easy","problem_code":"ODDARY","problem_name":"Odd Array","problemComponents":{"constraints":"- $1 \\leq T \\leq 500$\n- $1 \\leq N \\leq 1000$","constraintsState":true,"subtasks":"","subtasksState":false,"inputFormat":"- First line will contain $T$, number of testcases. Then the testcases follow. \n- Each testcase contains of a single line of input, one integer $N$. ","inputFormatState":true,"outputFormat":"For each test case, output in a single line $N$ space-separated integers representing the required array. If there are multiple solutions, you may output any.","outputFormatState":true,"sampleTestCases":{"0":{"id":1,"input":"3\n1\n2\n7","output":"1\n2 1\n1 2 3 2 1 2 3","explanation":"**Test case $1$**: $[1]$ is the obvious answer.\n\n**Test case $2$**: Since we need two elements and they can\u0027t be the same (otherwise the frequency of that element of the whole array is even), $[2, 1]$ is the optimal answer. $[1, 2]$ is another optimal one.\n\n**Test case $3$**: It can be proven that no construction exists with the maximum element of $2$.","isDeleted":false}}},"video_editorial_url":"","languages_supported":{"0":"CPP14","1":"C","2":"JAVA","3":"PYTH 3.6","4":"CPP17","5":"PYTH","6":"PYP3","7":"CS2","8":"ADA","9":"PYPY","10":"TEXT","11":"PAS fpc","12":"NODEJS","13":"RUBY","14":"PHP","15":"GO","16":"HASK","17":"TCL","18":"PERL","19":"SCALA","20":"LUA","21":"kotlin","22":"BASH","23":"JS","24":"LISP sbcl","25":"rust","26":"PAS gpc","27":"BF","28":"CLOJ","29":"R","30":"D","31":"CAML","32":"FORT","33":"ASM","34":"swift","35":"FS","36":"WSPC","37":"LISP clisp","38":"SQL","39":"SCM guile","40":"PERL6","41":"ERL","42":"CLPS","43":"ICK","44":"NICE","45":"PRLG","46":"ICON","47":"COB","48":"SCM chicken","49":"PIKE","50":"SCM qobi","51":"ST","52":"SQLQ","53":"NEM"},"max_timelimit":2,"source_sizelimit":50000,"problem_author":"daanish_adm","problem_tester":"","date_added":"2-03-2021","tags":{"0":"cook132","1":"daanish_adm","2":"easy","3":"gray"},"problem_difficulty_level":"Unavailable","best_tag":"","editorial_url":"https://discuss.codechef.com/problems/ODDARY","time":{"view_start_date":1629658804,"submit_start_date":1629658804,"visible_start_date":1629658804,"end_date":1735669800},"is_direct_submittable":false,"problemDiscussURL":"https://discuss.codechef.com/search?q=ODDARY","is_proctored":false,"visitedContests":{},"layout":"problem"}
---
### Read problems statements in [Mandarin Chinese](https://www.codechef.com/download/translated/COOK132/mandarin/ODDARY.pdf), [Russian](https://www.codechef.com/download/translated/COOK132/russian/ODDARY.pdf), and [Bengali](https://www.codechef.com/download/translated/COOK132/bengali/ODDARY.pdf) as well.

Construct an array of length $N$ containing only positive integers in the range $[1, 1000]$ such that there doesn’t exist a subarray that has all elements occurring in even frequency and the maximum element in the array is minimized. In case there are multiple solutions, you can output any.
<aside style='background: #f8f8f8;padding: 10px 15px;'><div>All submissions for this problem are available.</div></aside>