摘要: 并查集 并查集,其实就是将树合并,我们让两棵树合并,就可以直接让根节点合并 代码实现(题目:luogu.com.cn/problem/P3367) #include<bits/stdc++.h> using namespace std; const int N = 2e5 + 5; int n, m 阅读全文
posted @ 2023-08-21 18:22 libohan0518 阅读(46) 评论(0) 推荐(0)