yp 极简 互质的集合 Disjoint Set:Union Find Tree C++
这里写目录标题直接代码
直接代码
#include<bits/stdc++.h>
using namespace std;
class DisjoinSet{
public:
vector<int> rank,p;
DisjoinSet(){}
DisjoinSet(int size){
rank.resize(size);
p.resize(size);
for(int i = 0;i < s
原创
2021-02-23 23:57:43 ·
133 阅读 ·
0 评论