暢通工程 -並查集

題目描述:任意兩個城鎮間都可以實現交通(不一定直接連接),問最少雪妖建設多少條路 #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)  
相關文章
相關標籤/搜索