3 2 1 1 2 1 2 3 2
6
For example, an operation with $(v,x)=(2,1)$ paints Vertices $1,2$ red, and an operation with $(v,x)=(1,0)$ paints Vertex $1$.
After at most one operation, the set of vertices painted red can be one of the following six: ${},{1},{2},{3},{1,2},{1,2,3}$.5 0 2
16 The given graph may not be connected.
6 8 2 1 2 1 2 3 2 3 4 3 4 5 1 5 6 2 6 1 3 1 2 10 1 1 100
40 The given graph may have multi-edges and self-loops.
{
"problem": {
"name": "Ex - Painting Weighted Graph",
"description": {
"content": "Given is an undirected graph with $N$ vertices and $M$ edges. The $i$\\-th edge connects Vertices $A_i$ and $B_i$ and has a weight of $C_i$. Initially, all vertices are painted black. You can do the fo",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 3000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc235_h"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Given is an undirected graph with $N$ vertices and $M$ edges. The $i$\\-th edge connects Vertices $A_i$ and $B_i$ and has a weight of $C_i$.\nInitially, all vertices are painted black. You can do the fo...",
"is_translate": false,
"language": "English"
}
]
}