一道裸的并查集,练练手不错. program CODEVS1073; var i,j,m,n,q,x,y,k1,k2,z:longint; f:..] of longint; function find(x:longint):longint; var fa:longint; begin while f[x]=x do exit(x); fa:=find(f[x]); f[x]:=fa; exit(fa); end; begin readln(n,m,q); to n do f[i]:=i; to…