5 6 3 4 2 4 3 1 2 2 3 4 5 1 5 1 3 4
1 3 3 3 3 Each query involves the following operation. * The first query $(x_1 = 1)$: Vertex $1$ has the integer $1$ written on it, and the vertices adjacent to Vertex $1$ are Vertices $2$ and $5$. Thus, the integers on Vertices $2$ and $5$ get replaced with $1$. * The second query $(x_2 = 3)$: Vertex $3$ has the integer $3$ written on it, and the vertices adjacent to Vertex $3$ are Vertices $2$ and $4$. Thus, the integers on Vertices $2$ and $4$ get replaced with $3$. * The third query $(x_3 = 4)$: Vertex $4$ has the integer $3$ written on it, and the vertices adjacent to Vertex $4$ are Vertices $2$, $3$, and $5$. Thus, the integers on Vertices $2$, $3$, and $5$ get replaced with $3$. (Vertices $2$ and $3$ already have $3$ written on them, so the actual change takes place only on Vertex $5$.)
14 14 8 7 4 13 9 9 8 4 3 7 2 13 8 12 8 11 3 6 3 7 14 6 5 1 4 10 13 5 2 2 6 12 9 1 10 5 4
1 6 1 1 6 6 1 9 9 10 11 12 10 14
{
"problem": {
"name": "Propagation",
"description": {
"content": "You are given a simple undirected graph with $N$ vertices and $M$ edges. The $N$ vertices are called Vertex $1$, Vertex $2$, $\\ldots$, Vertex $N$. For each $i = 1, 2, \\ldots, M$, the $i$\\-th edge co",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc219_g"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a simple undirected graph with $N$ vertices and $M$ edges. The $N$ vertices are called Vertex $1$, Vertex $2$, $\\ldots$, Vertex $N$. \nFor each $i = 1, 2, \\ldots, M$, the $i$\\-th edge co...",
"is_translate": false,
"language": "English"
}
]
}