3 2 1 3 1 5 1 2 1 3
3
500000005
500000008
* If Edge $1$ is chosen in the only operation: the vertices written on Vertices $1, 2, 3$ will be $2, 2, 5$, respectively.
* If Edge $2$ is chosen in the only operation: the vertices written on Vertices $1, 2, 3$ will be $4, 1, 4$, respectively.
Thus, the expected values of the numbers written on Vertices $1, 2, 3$ are $3, \frac{3}{2}, \frac{9}{2}$, respectively.
If we express them modulo $(10^9 + 7)$ as described in Notes, they will be $3, 500000005, 500000008$, respectively.3 2 2 12 48 36 1 2 1 3
750000036
36
250000031
* If Edge $1$ is chosen in the $1$\-st operation: The numbers written on Vertices $1, 2, 3$ will be $30, 30, 36$, respectively.
* If Edge $1$ is chosen in the $2$\-nd operation: The numbers written on Vertices $1, 2, 3$ will be $30, 30, 36$, respectively.
* If Edge $2$ is chosen in the $2$\-nd operation: The numbers written on Vertices $1, 2, 3$ will be $33, 30, 33$, respectively.
* If Edge $2$ is chosen in the $1$\-st operation: The numbers written on Vertices $1, 2, 3$ will be $24, 48, 24$, respectively.
* If Edge $1$ is chosen in the $2$\-nd operation: The numbers written on Vertices $1, 2, 3$ will be $36, 36, 24$, respectively.
* If Edge $2$ is chosen in the $2$\-nd operation: The numbers written on Vertices $1, 2, 3$ will be $24, 48, 24$, respectively.
Each of these four scenarios happen with probability $\frac{1}{4}$, so the expected values of the numbers written on Vertices $1, 2, 3$ are $\frac{123}{4}, \frac{144}{4} (=36), \frac{117}{4}$, respectively.4 5 1000 578 173 489 910 1 2 2 3 3 4 4 1 1 3
201113830 45921509 67803140 685163678
{
"problem": {
"name": "Graph Smoothing",
"description": {
"content": "We have a simple undirected graph with $N$ vertices and $M$ edges. The vertices are numbered $1$ through $N$ and the edges are numbered $1$ through $M$. Edge $i$ connects Vertex $X_i$ and Vertex $Y_",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc199_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have a simple undirected graph with $N$ vertices and $M$ edges. The vertices are numbered $1$ through $N$ and the edges are numbered $1$ through $M$. \nEdge $i$ connects Vertex $X_i$ and Vertex $Y_...",
"is_translate": false,
"language": "English"
}
]
}