原理 算法实现 主要函数: 查并集: find 点 x 的祖先 edge的比较大小函数 kruskal函数 #include<iostream> #include<algorithm> using namespace std; struct Edge{ int a,b,w; }edg[200010]; int p[200010]; int n,m; bool compareEdg(const Edge &a, const Edge &<