摘要: 思路: 带权并查集+向量偏移 1 #include <iostream> 2 using namespace std; 3 int n, m; 4 int pre[200005]; 5 int f[200005]; // 到根节点的距离 6 int ans = 0; 7 8 void init() 阅读全文
posted @ 2019-04-27 23:02 域Anton 阅读(255) 评论(0) 推荐(0)