
MST (最小生成树)
synapse7
这个作者很懒,什么都没留下…
展开
-
POJ 1258 Agri-Net(MST)
Agri-Net http://poj.org/problem?id=1258 Time Limit: 1000MS Memory Limit: 10000K Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring原创 2013-08-06 09:39:09 · 1143 阅读 · 0 评论 -
HDU 1102/POJ 2421 Constructing Roads(MST&Prim优化)
Constructing Roads http://acm.hdu.edu.cn/showproblem.php?pid=1102 http://poj.org/problem?id=2421 Description There are N villages, which are numbered from 1 to N, and you should build some原创 2013-08-06 15:30:46 · 1099 阅读 · 0 评论 -
POJ 3522 Slim Span(MST)
Slim Span http://poj.org/problem?id=3522 Time Limit: 5000MS Memory Limit: 65536K Description Given an undirected weighted graph G, you should find one of spanning trees specified as fol原创 2013-08-07 11:21:14 · 1003 阅读 · 0 评论 -
POJ 1679 The Unique MST(次小生成树&Kruskal)
The Unique MST http://poj.org/problem?id=1679 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connect原创 2013-08-06 23:46:44 · 1232 阅读 · 0 评论 -
UVa 10034 Freckles (MST & 稠密图的O(V^2)的Prim算法)
10034 - Freckles Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=116&page=show_problem&problem=975 纯模板题。 完整代码: /*0.019s*/ #inclu原创 2014-01-11 15:52:48 · 1284 阅读 · 0 评论 -
MST模板:使用priority_queue实现的Prim算法
测试数据: 8 16 4 5 .35 4 7 .37 5 7 .28 0 7 .16 1 5 .32 0 4 .38 2 3 .17 1 7 .19 0 2 .26 1 2 .36 1 3 .29 2 7 .34 6 2 .40 3 6 .52 6 0 .58 6 4 .93 测试结果: 1.81 代码: #include #include #原创 2014-02-16 00:05:11 · 1720 阅读 · 6 评论