API Response (JSON)
{
"problem": {
"name": "[中山市赛 2024] 树上开花",
"description": {
"content": "你有一棵以 1 为根的树,统计点对 $(x, y)$,满足 $a_{lca(x,y)}$ 是 $a_x$ 和 $a_y$ 的公约数。注意当 $x \\neq y$ 时 $(x, y)$ 和 $(y, x)$ 视为不同的点对。 ",
"description_type": "Markdown"
},
"platform": "Luogu",
"limit": {
"time_limit": 1000,
"memory_limit": 524288
},
"difficulty": {
"LuoguStyle": "P4"
},
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "LGB4189"
},
"statements": [
{
"statement_type": "Markdown",
"content": "你有一棵以 1 为根的树,统计点对 $(x, y)$,满足 $a_{lca(x,y)}$ 是 $a_x$ 和 $a_y$ 的公约数。注意当\n$x \\neq y$ 时 $(x, y)$ 和 $(y, x)$ 视为不同的点对。\n\n## Input\n\n第一行一个整数 $n$。\n\n第二行 $n$ 个整数 $a_i$。\n\n第三到 $n + 1$ 行,每行两个整数,表示树上的边。\n\n## Output\n\n一行...",
"is_translate": false,
"language": "English"
}
]
}