2 3 1 2 1 4 2 3
1 The only way to complete the procedure is to choose Students $2$ and $3$ in the first and Students $1$ and $4$ in the second. If Students $1$ and $2$ are chosen in the first operation, Students $3$ and $4$ will remain, who are on bad terms and thus cannot be paired in the second operation. Thus, you should print $1$.
2 2 1 2 3 4
2 There are two ways to complete the procedure: one way is to choose Students $1$ and $2$ in the first operation and Students $3$ and $4$ in the second, and the other way is to choose Students $3$ and $4$ in the first operation and Students $1$ and $2$ in the second. Note that these two ways are distinguished.
2 2 1 3 2 4
0 Since no pair can be chosen in the first operation, there is no way to complete the procedure, so you should print $0$.
{
"problem": {
"name": "Make Pair",
"description": {
"content": "There are $2N$ students standing in a row, numbered $1$, $2$, $\\ldots$, $2N$ from left to right. For all pairs of two students, they are on good or bad terms. Specifically, for each $1\\leq i\\leq M$, 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": "abc217_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $2N$ students standing in a row, numbered $1$, $2$, $\\ldots$, $2N$ from left to right. For all pairs of two students, they are on good or bad terms. Specifically, for each $1\\leq i\\leq M$, S...",
"is_translate": false,
"language": "English"
}
]
}