POJ2485 求最小生成树的最大边长度

此题关键要理解输出的定义

For each test case, you should output a line contains an integer, which is the length of the longest road to be built such that all the villages are connected, and this value is minimum.
输出是最小生成树中最长边的长度

对prim算法稍作变化即可AC

Source Code

Problem: 2485   User: yangliuACMer
Memory: 1232K   Time: 750MS
Language: C++   Result: Accepted


posted @ 2012-02-09 23:27  yangleo  阅读(216)  评论(0编辑  收藏  举报