带路径压缩的并查集(刘汝佳)
int fa[100]; int find(x){return x==fa[x]?x:fa[x]=find(fa[x]);} void Union(x,y) { x=find(x);y=find(y); fa[x]=y; }