畅通工程 -并查集

题目描述:任意两个城镇间都可以实现交通(不一定直接连接),问最少雪妖建设多少条路 #include<iostream> #include<string.h> #include<string> #include<math.h> using namespace std; int path[1000]; int findroot(int x,int *a) {     if (a[x] == -1)  
相关文章
相关标签/搜索