摘要:
/* ***********************************************Author :xryzEmail :523689985@qq.comCreated Time :5-3 19:23:22File Name :... 阅读全文
摘要:
#includestruct node{ int parent; int up; int all;} n[30000+5];int Find(int x){ if(x!=n[x].parent) { int t=Find(n[x].pare... 阅读全文
摘要:
int find(int x) { if(fa[x] == x) return x; fa[x] = find(fa[x]); return fa[x];}void unio(int x, int y) { int fx = fin... 阅读全文
摘要:
#includeint bin[1024];int findx(int x){ while(bin[x]!=x) x=bin[x]; return x;}void mergeab(int x,int y){ int fx,fy; fx=findx... 阅读全文
摘要:
#includeint bin[1024];int findx(int x){ while(bin[x]!=x) x=bin[x]; return x;}void mergeab(int x,int y){ int fx,fy; fx=findx... 阅读全文