3 010
14 $G$ has four undirected edges: $\lbrace 0, 1 \rbrace, \lbrace 0, 2 \rbrace, \lbrace 1, 2 \rbrace, \lbrace 1, 3 \rbrace$. For example, if we assign directions to each edge as $0 \to 1$, $2 \to 0$, $2 \to 1$, $1 \to 3$, then $(d_0, d_1, d_2, d_3) = (1, 2, 0, 1)$ is obtained. The possible sequences $(d_0, d_1, d_2, d_3)$ are $(0, 1, 2, 1)$, $(0, 2, 1, 1)$, $(0, 2, 2, 0)$, $(0, 3, 1, 0)$, $(1, 0, 2, 1)$, $(1, 1, 1, 1)$, $(1, 1, 2, 0)$, $(1, 2, 0, 1)$, $(1, 2, 1, 0)$, $(1, 3, 0, 0)$, $(2, 0, 1, 1)$, $(2, 1, 0, 1)$, $(2, 1, 1, 0)$, $(2, 2, 0, 0)$, for a total of $14$.
20 00001100111010100101
261339902
{
"problem": {
"name": "Broken Wheel",
"description": {
"content": "You are given a positive integer $N$ and a length-$N$ string $s_0s_1\\ldots s_{N-1}$ consisting only of `0` and `1`. Consider a simple undirected graph $G$ with $(N+1)$ vertices numbered $0, 1, 2, \\ldo",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc193_b"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a positive integer $N$ and a length-$N$ string $s_0s_1\\ldots s_{N-1}$ consisting only of `0` and `1`.\nConsider a simple undirected graph $G$ with $(N+1)$ vertices numbered $0, 1, 2, \\ldo...",
"is_translate": false,
"language": "English"
}
]
}