圖論並查集

#include <bits/stdc++.h> using namespace std; const int MAXN=1e6+7; int p[MAXN]; int _find(int x) { return p[x]==x?x:p[x]=_find(p[x]); } void _union(int x,int y) { int p1=_find(x),p2=_find(
相關文章
相關標籤/搜索