API Response (JSON)
{
"problem": {
"name": "G. The Tree",
"description": {
"content": "Abendsen assigned a mission to Juliana. In this mission, Juliana has a rooted tree with $n$ vertices. Vertex number $1$ is the root of this tree. Each vertex can be either black or white. At first, al",
"description_type": "Markdown"
},
"platform": "Codeforces",
"limit": {
"time_limit": 3000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "CF1017G"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Abendsen assigned a mission to Juliana. In this mission, Juliana has a rooted tree with $n$ vertices. Vertex number $1$ is the root of this tree. Each vertex can be either black or white. At first, al...",
"is_translate": false,
"language": "English"
},
{
"statement_type": "Markdown",
"content": "Abendsen 为 Juliana 安排了一项任务。在这项任务中,Juliana 拥有一棵包含 $n$ 个顶点的有根树,顶点编号为 $1$ 的是树的根。每个顶点可以是黑色或白色。最初,所有顶点都是白色的。Juliana 需要处理 $q$ 个查询,每个查询属于以下三种类型之一:\n\n你能帮助 Juliana 处理所有这些查询吗?\n\n第一行包含两个整数 $n$ 和 $q$($2 lt.eq n lt....",
"is_translate": true,
"language": "Chinese"
},
{
"statement_type": "Markdown",
"content": "**Definitions** \nLet $ T = (V, E) $ be a rooted tree with $ n $ vertices, where $ V = \\{1, 2, \\dots, n\\} $ and vertex $ 1 $ is the root. \nLet $ \\text{parent}(v) = p_v $ for $ v \\in \\{2, \\dots, n\\} $...",
"is_translate": false,
"language": "Formal"
}
]
}