![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小、最大、次小生成树
文章平均质量分 80
笑着走完自己的路
这个作者很懒,什么都没留下…
展开
-
hdoj 3371 Connect the Cities
Connect the CitiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11913 Accepted Submission(s): 3329Problem DescriptionIn 2100,原创 2015-03-19 21:40:55 · 727 阅读 · 0 评论 -
hdoj 3367 Pseudoforest 【伪森林】 【并查集判断环 + 最大生成树】
PseudoforestTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2126 Accepted Submission(s): 828Problem DescriptionIn graph theo原创 2015-07-22 10:37:02 · 738 阅读 · 2 评论 -
hdoj 4786 Fibonacci Tree 【最小生成树 + 最大生成树】
Fibonacci TreeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2563 Accepted Submission(s): 817Problem Description Coach Pang i原创 2015-03-25 13:00:04 · 656 阅读 · 0 评论 -
hdoj 4081 Qin Shi Huang's National Road System 【次小生成树变形】
Qin Shi Huang's National Road SystemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5200 Accepted Submission(s): 1811Problem De原创 2015-08-11 08:16:31 · 520 阅读 · 0 评论 -
poj 1679 The Unique MST 【次小生成树模版】
The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 23978 Accepted: 8505DescriptionGiven a connected undirected graph, tell if its minimum spa原创 2015-08-10 19:47:58 · 521 阅读 · 0 评论 -
zzuoj 10409: D.引水工程 【最小生成树】
10409: D.引水工程 Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 18 Solved: 10[Submit][Status][Web Board]Description南水北调工程是优化水资源配置、促进区域协调发展的基础性工程,是新中国成立以来投资额最大、涉及面最广的战略性工程,事关中华民族长远发展。“南水北原创 2015-05-22 13:51:49 · 834 阅读 · 0 评论 -
Codeforces 609E Minimum spanning tree for each edge【MST + LCA倍增】
E. Minimum spanning tree for each edgetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputConnected undirected原创 2015-12-30 16:59:45 · 578 阅读 · 0 评论 -
hdoj 1863 畅通工程
畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18699 Accepted Submission(s): 7923Problem Description省政府“畅通工程”的目标是使全省任何两个村庄原创 2015-01-29 15:57:31 · 553 阅读 · 0 评论 -
hdoj 1233 还是畅通工程
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27915 Accepted Submission(s): 12452Problem Description某省调查乡村交通状况,得到的统计表中列原创 2015-01-28 20:19:06 · 636 阅读 · 0 评论 -
hdoj 5627 Clarke and MST 【最大and生成树】
Clarke and MSTTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 165 Accepted Submission(s): 85Problem DescriptionClarke is a pa原创 2016-02-14 16:53:27 · 514 阅读 · 0 评论 -
hdoj 5253 连接的管道 【MST】
题目链接:hdoj 5253 连接的管道连接的管道Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1955 Accepted Submission(s): 685Problem Description 老 Jack原创 2016-04-07 17:21:37 · 369 阅读 · 0 评论 -
次小生成树 【总结】
MST - 最小生成树引子:给你N个点以及M条边,问你MST是否唯一,若不唯一输出-1,否则输出MST的值。通过 枚举 + 删边 + 再求MST 完全可以做到求解上述题目,但时间复杂度过高。这里介绍一种(N*2)的算法,是结合prime算法实现的。算法核心思想:在prime求MST的过程中 用数组存储MST里面任意两点间的最大权值。最后枚举不在MST里面的边,判原创 2015-08-10 18:37:59 · 1332 阅读 · 8 评论 -
poj 2728 Desert King 【最优比例生成树 0-1分数规划】 【二分 or 迭代 + MST】
Desert KingTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 22289 Accepted: 6253DescriptionDavid the Great has just become the king of a desert country.原创 2015-09-01 18:00:08 · 1817 阅读 · 1 评论 -
hdoj 1162 Eddy's picture 【最小生成树】
Eddy's pictureTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7397 Accepted Submission(s): 3753Problem DescriptionEddy begins t原创 2015-02-09 22:52:51 · 495 阅读 · 0 评论 -
hdoj 2682 Tree
TreeTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1760 Accepted Submission(s): 514Problem DescriptionThere are N (2<=N<=600)原创 2015-03-24 17:17:05 · 516 阅读 · 0 评论 -
poj 1258 Agri-Net 【最小生成树 基础题】
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 43572 Accepted: 17819DescriptionFarmer John has been elected mayor of his town! One of his campaig原创 2015-05-29 23:24:02 · 501 阅读 · 0 评论 -
poj 2031 Building a Space Station 【最小生成树 prime】
Building a Space StationTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5240 Accepted: 2644DescriptionYou are a member of the space station engineerin原创 2015-06-23 21:57:10 · 432 阅读 · 0 评论 -
poj 1287 Networking 【MST】【练模板】
NetworkingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7410 Accepted: 4035DescriptionYou are assigned to design network connections between certain p原创 2015-08-24 20:20:01 · 494 阅读 · 0 评论 -
hdoj 1301 Jungle Roads 【最小生成树】
Jungle RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4704 Accepted Submission(s): 3455Problem DescriptionThe Head原创 2015-02-12 22:28:31 · 505 阅读 · 0 评论 -
hdoj 1875 畅通工程再续 【最小生成树】
畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16870 Accepted Submission(s): 5258Problem Description相信大家都听说一个“百岛湖”的地方吧,百原创 2015-03-18 19:43:42 · 618 阅读 · 0 评论 -
nyoj 38 布线问题 【最小生成树】
布线问题时间限制:1000 ms | 内存限制:65535 KB难度:4描述 南阳理工学院要进行用电线路改造,现在校长要求设计师设计出一种布线方式,该布线方式需要满足以下条件:1、把所有的楼都供上电。2、所用电线花费最少输入第一行是一个整数n表示有n组测试数据。(n每组测试数据的第一行是两个整数v,e.v表示学校里楼的总个数(v原创 2015-01-28 19:59:52 · 496 阅读 · 0 评论 -
hdoj 1879 继续畅通工程 【最小生成树】
继续畅通工程Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15060 Accepted Submission(s): 6515Problem Description省政府“畅通工程”的目标是使全省任何两个原创 2015-01-31 14:00:54 · 434 阅读 · 0 评论 -
hdoj 2122 Ice_cream’s world III 【最小生成树】
Ice_cream’s world IIITime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1074 Accepted Submission(s): 345Problem Descriptionice_cre原创 2015-03-17 22:34:33 · 428 阅读 · 0 评论 -
hdoj 1102 Constructing Roads 【最小生成树】
Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15020 Accepted Submission(s): 5732Problem DescriptionThere ar原创 2015-01-28 19:23:09 · 529 阅读 · 0 评论