3 4 1 2 1 2 3 2 3 1 3 1 3 1
1
2
1
* We write $1$, $2$, and $1$ on Vertex $1$, $2$, and $3$, respectively.
* Edge $1$ connects Vertex $1$ and $2$, and its label is $1$.
* Only the integer written on Vertex $1$ equals the label, so this edge will not get removed.
* Edge $2$ connects Vertex $2$ and $3$, and its label is $2$.
* Only the integer written on Vertex $2$ equals the label, so this edge will not be removed.
* Edge $3$ connects Vertex $1$ and $3$, and its label is $3$.
* Both integers written on the vertices differ from the label, so this edge will be removed.
* Edge $4$ connects Vertex $1$ and $3$, and its label is $1$.
* Both integers written on the vertices equal the label, so this edge will be removed.
* After Edge $3$ and $4$ are removed, the graph will still be connected, so this is a good way of writing integers.{
"problem": {
"name": "Keep Graph Connected",
"description": {
"content": "Given is an undirected connected graph with $N$ vertices numbered $1$ to $N$, and $M$ edges numbered $1$ to $M$. The given graph may contain multi-edges but not self loops. Each edge has an integer la",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc108_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Given is an undirected connected graph with $N$ vertices numbered $1$ to $N$, and $M$ edges numbered $1$ to $M$. The given graph may contain multi-edges but not self loops.\nEach edge has an integer la...",
"is_translate": false,
"language": "English"
}
]
}