{"problem":{"name":"Erase by Value","description":{"content":"Given is a sequence of $N$ integers $A=(A_1,A_2,\\cdots,A_N)$. Snuke now chooses a value in $A$. Let $x$ be the value chosen. Then, he makes an integer sequence $a$ by lining up all elements of $A$ tha","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc133_a"},"statements":[{"statement_type":"Markdown","content":"Given is a sequence of $N$ integers $A=(A_1,A_2,\\cdots,A_N)$.\nSnuke now chooses a value in $A$. Let $x$ be the value chosen. Then, he makes an integer sequence $a$ by lining up all elements of $A$ that are not $x$ without changing the order.\nFind the lexicographically smallest sequence that can be obtained as $a$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 200000$\n*   $1 \\leq A_i \\leq N$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\cdots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc133_a","tags":[],"sample_group":[["5\n2 4 4 1 2","2 1 2\n\nFor example, when $x=2$, we will have $a=(4,4,1)$. When $x=4$, we will have $a=(2,1,2)$, which is the lexicographically smallest."],["3\n1 1 1","When $x=1$, $a$ will be empty, which is obviously the lexicographically smallest. As a side note, the output may contain additional spaces or newlines."],["5\n1 1 2 3 3","1 1 2"]],"created_at":"2026-03-03 11:01:14"}}