3 1 2 1 2 1 3
\-1 It can be proved that it's impossible to obtain the required configuration.
4 1 3 1 4 1 4 2 4
4
We can perform the following sequence of operations:
* Choose $i = 2$, get $S_1 = {1}, S_2 = {2, 3}, S_3 = {2, 3}, S_4 = {4}$
* Choose $i = 1$, get $S_1 = {1, 2, 3}, S_2 = {1, 2, 3}, S_3 = {2, 3}, S_4 = {4}$
* Choose $i = 3$, get $S_1 = {1, 2, 3}, S_2 = {1, 2, 3}, S_3 = {2, 3, 4}, S_4 = {2, 3, 4}$
* Choose $i = 2$, get $S_1 = {1, 2, 3}, S_2 = {1, 2, 3, 4}, S_3 = {1, 2, 3, 4}, S_4 = {2, 3, 4}${
"problem": {
"name": "Set Merging",
"description": {
"content": "You have $N$ sets $S_1, S_2, \\ldots, S_N$. Initially, for each $i$ from $1$ to $N$, set $S_i$ contains only integer $i$ (that is, $S_i = {i}$). You are allowed to perform the following operation: * ",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 3000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "agc055_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You have $N$ sets $S_1, S_2, \\ldots, S_N$. Initially, for each $i$ from $1$ to $N$, set $S_i$ contains only integer $i$ (that is, $S_i = {i}$).\nYou are allowed to perform the following operation:\n\n* ...",
"is_translate": false,
"language": "English"
}
]
}