摘要:
每一次枚举到重心 按子树中的黑点数SORT一下 启发式合并 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int MAXN = 2e6 + 5; const int MAXM = 2 阅读全文
摘要:
这题数据范围变成了200000 n^2就过不了 同时要求求的是最少的边数 不能容斥 #include<bits/stdc++.h> using namespace std; const int MAXN = 2e5 + 5; const int MAXM = 2e5 + 5; int to[MAXM 阅读全文