3 010 001 010
1.66666666666666666667
We have the following three scenarios happening with equal probability:
* Choose Vertex $1$ in the first operation, erasing Vertex $1$, $2$, and $3$. The graph is now empty, so we are done.
* Choose Vertex $2$ in the first operation, erasing Vertex $2$ and $3$. Then, choose Vertex $1$ in the second operation, erasing Vertex $1$. The graph is now empty, so we are done.
* Choose Vertex $3$ in the first operation, erasing Vertex $2$ and $3$. Then, choose Vertex $1$ in the second operation, erasing Vertex $1$. The graph is now empty, so we are done.
Thus, the expected value of the number of times the operation is done is $(1+2+2)/3=5/3$.3 000 000 000
3.00000000000000000000 There will always be three operations.
3 011 101 110
1.00000000000000000000 There will always be one operation.
{
"problem": {
"name": "Erasing Vertices",
"description": {
"content": "We have a directed graph with $N$ vertices numbered $1$ to $N$. $N$ strings of length $N$ each, $S_1,S_2,\\ldots,S_N$, represent the edges in the graph. Specifically, $S_{i,j}$ is `1` if there is an ed",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "agc049_a"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have a directed graph with $N$ vertices numbered $1$ to $N$. $N$ strings of length $N$ each, $S_1,S_2,\\ldots,S_N$, represent the edges in the graph. Specifically, $S_{i,j}$ is `1` if there is an ed...",
"is_translate": false,
"language": "English"
}
]
}