#include<iostream> #include<algorithm> using namespace std; struct Node { int x; int y; int weight; }; int root[100]; bool Compare(Node node1, Node node2) { return node1.weight < node2.weight; } int Find(int x) { while (x != root[x]) x = root[x]; return x; }//查 void Union(int x, int y...