题目链接 题解:并查集把一个家的并在一起,特殊的一点是编号大的并到小的去.这个题有个坑编号可能为0000,会错数据3和5. 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 struct node 5 { 6 int id,num,area,fa,ma; 7 int ch[10]; 8 }p[100100]; 9 10 struct fz 11 { 12 int id,all; 13 double num,area; 14 }q[1001…