//并查集模板题 #include <bits/stdc++.h> using namespace std; struct node{ int x,y; int val; }; int father[110]; int cmp(node x,node y) { return x.val<y.val; } int Find(int u) { if(father[u]==-1)return u; return Find(father[u]); } void Union(int x,int y) { father[y]=x; } in...