MST (最小生成树)
synapse7
这个作者很懒,什么都没留下…
展开
-
POJ 1258 Agri-Net(MST)
Agri-Nethttp://poj.org/problem?id=1258Time Limit: 1000MSMemory Limit: 10000KDescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring原创 2013-08-06 09:39:09 · 1124 阅读 · 0 评论 -
HDU 1102/POJ 2421 Constructing Roads(MST&Prim优化)
Constructing Roadshttp://acm.hdu.edu.cn/showproblem.php?pid=1102http://poj.org/problem?id=2421DescriptionThere are N villages, which are numbered from 1 to N, and you should build some原创 2013-08-06 15:30:46 · 1064 阅读 · 0 评论 -
POJ 3522 Slim Span(MST)
Slim Spanhttp://poj.org/problem?id=3522Time Limit: 5000MSMemory Limit: 65536KDescriptionGiven an undirected weighted graph G, you should find one of spanning trees specified as fol原创 2013-08-07 11:21:14 · 974 阅读 · 0 评论 -
POJ 1679 The Unique MST(次小生成树&Kruskal)
The Unique MSThttp://poj.org/problem?id=1679DescriptionGiven 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 · 1210 阅读 · 0 评论 -
UVa 10034 Freckles (MST & 稠密图的O(V^2)的Prim算法)
10034 - FrecklesTime limit: 3.000 secondshttp://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 · 1256 阅读 · 0 评论 -
MST模板:使用priority_queue实现的Prim算法
测试数据:8 164 5 .354 7 .375 7 .280 7 .161 5 .320 4 .382 3 .171 7 .190 2 .261 2 .361 3 .292 7 .346 2 .403 6 .526 0 .586 4 .93测试结果:1.81代码:#include#include#原创 2014-02-16 00:05:11 · 1664 阅读 · 6 评论