随笔分类 - 最小生成树----Kruskal
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1162输入一个整数n,表示点的个数.接下来n行,每行有两个浮点数表示点的x坐标y坐标.构造一棵最小生成树.用Kruskal做.先算出各条边的权值.再合并//View Code 1 #include <iostream> 2 #include <algorithm> 3 #include <cmath> 4 using namespace std; 5 const int MAX = 10000 + 10; 6 const int INF = 0x3fffffff; 7 in
阅读全文

浙公网安备 33010602011771号