int find1(int x) { return f[x]==x?x:f[x]=find1(f[x]); } void union1(int a,int b) { int x=find1(a); int y=find1(b); if(x!=y) f[x]=y; }
int find1(int x) { return f[x]==x?x:f[x]=find1(f[x]); } void union1(int a,int b) { int x=find1(a); int y=find1(b); if(x!=y) f[x]=y; }