![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论 - 树
Nitrogens Xu
这个作者很懒,什么都没留下…
展开
-
Codeforces - 1042F - Leaf Sets(贪心 + 乱搞)
4.1 题意 给定一棵 n(3≤n≤106)n(3 \le n \le 10^6)n(3≤n≤106) 个节点的无向树和一个整数 k(1≤k≤106)k(1 \le k \le 10^6)k(1≤k≤106)。 定义一个叶子集合是 beautiful 的,当且仅当集合中任意一对叶子的距离都不超过 kkk。 现在要将这棵树的叶子节点进行划分,问最少划分出几个集合,使得这些集合都是 beautiful...原创 2019-10-01 13:31:50 · 144 阅读 · 0 评论 -
Codeforces - 845G - Shortest Path Problem?(DFS + 线性基)
题目链接:https://codeforces.com/contest/845/problem/G 7.1 题意 给定一个 n(1≤n≤105)n(1 \le n \le 10^5)n(1≤n≤105) 个节点和 m(n−1≤m≤105)m(n-1 \le m \le 10^5)m(n−1≤m≤105) 条边的无向连通图,定义一条路径的长度为这条路径上边权的异或和。 问从 111 点到 nnn 点...原创 2019-10-01 16:53:11 · 161 阅读 · 0 评论