7 2 4 6 5 6 10 1 2 1 3 2 4 2 5 5 6 5 7
5 Here is a possible progression of the game when both players play optimally. 1. The piece starts on Vertex $1$. 2. Aoki changes the integer written on Vertex $7$ from $10$ to $0$. 3. Takahashi moves the piece from Vertex $1$ to Vertex $2$. 4. Aoki changes the integer written on Vertex $4$ from $6$ to $0$. 5. Takahashi moves the piece from Vertex $2$ to Vertex $5$. 6. Takahashi chooses to end the game. At the end of the game, the piece is on Vertex $5$, on which the integer $5$ is written at that time, so Takahashi's score will be $5$.
30 29 27 79 27 30 4 93 89 44 88 70 75 96 3 78 39 97 12 53 62 32 38 84 49 93 53 26 13 25 13 15 14 22 17 24 12 3 4 3 5 8 26 15 3 2 2 9 4 25 4 13 2 10 28 15 6 4 2 5 19 9 2 7 2 14 23 30 17 2 7 16 21 13 13 23 13 20 1 2 6 18 27 6 21 29 11 8
70
{
"problem": {
"name": "Game on Tree 3",
"description": {
"content": "There is a rooted tree with $N$ vertices, Vertex $1$ being the root. For each $i = 1, 2, \\ldots, N-1$, the $i$\\-th edge connects Vertex $u_i$ and Vertex $v_i$. Each vertex other than the root has a po",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 6000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc246_g"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is a rooted tree with $N$ vertices, Vertex $1$ being the root. For each $i = 1, 2, \\ldots, N-1$, the $i$\\-th edge connects Vertex $u_i$ and Vertex $v_i$. Each vertex other than the root has a po...",
"is_translate": false,
"language": "English"
}
]
}