API Response (JSON)
{
"problem": {
"name": "[Ynoi2000] tmostnrq2",
"description": {
"content": "给定 $n$ 个顶点的树,顶点编号为 $1,\\dots,n$,给定长度 $n_0$ 的序列 $a_1,\\dots,a_{n_0}$,共 $m$ 次查询,每次查询给定 $l,r,x$,问树的顶点 $x$,依次向 $a_l,\\dots,a_r$ 移动一步,到达的顶点。 若 $x=y$,则从顶点 $x$ 向 $y$ 移动一步到达 $x$,否则到达与 $x$ 在树上相邻且距离 $y$ 最近的位置。",
"description_type": "Markdown"
},
"platform": "Luogu",
"limit": {
"time_limit": 12000,
"memory_limit": 524288
},
"difficulty": {
"LuoguStyle": "P7"
},
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "LGP9999"
},
"statements": [
{
"statement_type": "Markdown",
"content": "给定 $n$ 个顶点的树,顶点编号为 $1,\\dots,n$,给定长度 $n_0$ 的序列 $a_1,\\dots,a_{n_0}$,共 $m$ 次查询,每次查询给定 $l,r,x$,问树的顶点 $x$,依次向 $a_l,\\dots,a_r$ 移动一步,到达的顶点。\n\n若 $x=y$,则从顶点 $x$ 向 $y$ 移动一步到达 $x$,否则到达与 $x$ 在树上相邻且距离 $y$ 最近的位置。\n\n#...",
"is_translate": false,
"language": "English"
}
]
}