随笔分类 -  并查集

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1102最小生成树(模板题)30 990 692990 0 179692 179 011 2一共3个村子,下面是第i行j列 i村子和j村子之间建路需要的距离下面是一个k代表有k条路已经修好了,1村子和2村子之间以修路... 阅读全文
posted @ 2015-05-21 20:33 煎饼馃子 阅读(132) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1162最小生成树 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N=5005; ... 阅读全文
posted @ 2015-05-21 15:32 煎饼馃子 阅读(145) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1301最小生成树模板题 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N=600... 阅读全文
posted @ 2015-05-20 21:04 煎饼馃子 阅读(116) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=18752210 1020 2031 12 21000 1000给定坐标 1 //最小生成树 2 #include 3 #include 4 #include 5 #include 6 #include ... 阅读全文
posted @ 2015-05-19 20:40 煎饼馃子 阅读(173) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1233最小生成树,kruskal算法 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const in... 阅读全文
posted @ 2015-05-16 16:54 煎饼馃子 阅读(204) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1213 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N=1005; 8 int... 阅读全文
posted @ 2015-05-16 11:29 煎饼馃子 阅读(222) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1116 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N=30; 8 int f... 阅读全文
posted @ 2015-05-13 20:29 煎饼馃子 阅读(134) 评论(0) 推荐(0)