3 7 1 14 3 9 4 8 2 6 5 5 13 8 2 3 10 2 0 1 2 0 4 2 4 6 2 4 8 2 3 5 1 6 30 2 3 5 2 4 6 1 1 10000000 2 0 8
2 1 4 8 17 18 13 15 * In the 1st query, using edge $8$, the path $0 \to 1$ results in a total distance of $2$. * In the 2nd query, using edge $2$, the path $0 \to 4$ results in a total distance of $1$. * In the 3rd query, using edge $6$, the path $4 \to 6$ results in a total distance of $4$. * In the 4th query, using edges $2, 1$, the path $4 \to 0 \to 8$ results in a total distance of $8$. * In the 5th query, using edges $11, 6, 13$, the path $3 \to 4 \to 6 \to 5$ results in a total distance of $17$. * In the 6th query, the length of edge $6$ is updated from $4$ to $30$. * In the 7th query, using edges $11, 12$, the path $3 \to 4 \to 5$ results in a total distance of $18$. * In the 8th query, using edges $2, 1, 15, 14$, the path $4 \to 0 \to 8 \to 7 \to 6$ results in a total distance of $13$. * In the 9th query, the length of edge $1$ is updated from $7$ to $10000000$. * In the 10th query, using edges $2, 3$, the path $0 \to 4 \to 8$ results in a total distance of $15$.
{
"problem": {
"name": "Segment Tree",
"description": {
"content": "You are given an undirected graph $G$ with $2^N + 1$ vertices and $2^{N+1} - 1$ edges. The vertices are numbered $0, 1, \\dots, 2^N$, and the edges are numbered $1, 2, \\dots, 2^{N+1}-1$. Each edge in $",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 6000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "ttpc2024_1_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given an undirected graph $G$ with $2^N + 1$ vertices and $2^{N+1} - 1$ edges. The vertices are numbered $0, 1, \\dots, 2^N$, and the edges are numbered $1, 2, \\dots, 2^{N+1}-1$.\nEach edge in $...",
"is_translate": false,
"language": "English"
}
]
}