摘要: #include<bits/stdc++.h> using namespace std; const int N = (int)2e5 + 7; const int inf = 0x3f3f3f3f; int n, m, q, w[N], pa[N], depth[N]; vector<int> G[N], G2[N]; multiset<int> mulset[N]; int sz[N], so 阅读全文
posted @ 2019-10-09 13:49 NotNight 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Adilbek and the Watering System 为什么这个题这么水, 感觉已经写过一万遍了, 还拿了一血。 HDU - 5380是这道题的加强版呀。 阅读全文
posted @ 2019-10-09 10:40 NotNight 阅读(394) 评论(0) 推荐(0) 编辑
摘要: The Maximum Subtree 考虑good tree 长什么样子, 除了一点可以有2个儿子有儿子以外, 其余点最多只能有一个儿子有儿子。 然后直接dp就好啦。 阅读全文
posted @ 2019-10-09 10:37 NotNight 阅读(410) 评论(0) 推荐(0) 编辑