2 BWBW
1 Vertices $2,4$ are white, and vertices $1,3$ are black. Let $(u,v)$ denote an edge from vertex $u$ to vertex $v$. If we pair up vertices as $(2,1), (4,3)$, the final graph have the edges $(1,2), (2,3), (3,4), (2,1), (4,3)$. In this case, for example, it is impossible to travel from vertex $3$ to vertex $1$ by following edges, so this graph is not strongly connected. If we pair up vertices as $(2,3), (4,1)$, the final graph have the edges $(1,2), (2,3), (3,4), (2,3), (4,1)$. This graph is strongly connected. Therefore, there is exactly $1$ way to pair up the vertices that satisfies the condition.
4 BWWBWBWB
0 No matter how you pair up the vertices, you cannot satisfy the condition.
9 BWWBWBBBWWBWBBWWBW
240792
{
"problem": {
"name": "Strongly Connected",
"description": {
"content": "There is a directed graph with $2N$ vertices and $2N-1$ edges. The vertices are numbered $1, 2, \\ldots, 2N$, and the $i$\\-th edge is a directed edge from vertex $i$ to vertex $i+1$. You are given a le",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 4000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc196_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is a directed graph with $2N$ vertices and $2N-1$ edges. The vertices are numbered $1, 2, \\ldots, 2N$, and the $i$\\-th edge is a directed edge from vertex $i$ to vertex $i+1$.\nYou are given a le...",
"is_translate": false,
"language": "English"
}
]
}