摘要: 题目 题目链接:https://codeforces.com/problemset/problem/671/D 给定一棵 \(n\) 个点的以 \(1\) 为根的树。 有 \(m\) 条路径 \((x,y)\),保证 \(y\) 是 \(x\) 或 \(x\) 的祖先,每条路径有一个权值。 你要在这 阅读全文
posted @ 2021-10-19 22:28 stoorz 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 题目 题目链接:https://codeforces.com/contest/1481/problem/F 给定一棵 \(n\) 个节点的树,根为 \(1\) ,每个节点会分配到一个字符 a 或 b。 要求整棵树中字符 a 的数量为 \(x\) ,字符 b 的数量为 \(n-x\) 。 定义节点 \ 阅读全文
posted @ 2021-10-19 10:10 stoorz 阅读(72) 评论(0) 推荐(0) 编辑