
krustal && Prim 最小生成树
文章平均质量分 87
cloudy_happy
像我这样优秀的人,不该平凡过一生
展开
-
poj2485 Highways Prim
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. They're pla...原创 2018-08-16 22:45:53 · 124 阅读 · 0 评论 -
poj1287 Networking Krustal最小生成树
Networking You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connec...原创 2018-08-16 22:50:46 · 177 阅读 · 0 评论 -
poj1285 Agri-Net Prim最小生成树
Agri-Net Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John order...原创 2018-08-16 23:03:49 · 177 阅读 · 0 评论 -
hdu1102 Constructing Roads Krustal最小生成树
Constructing Roads There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are conn...原创 2018-08-16 23:18:02 · 116 阅读 · 0 评论 -
最小生成树的学习
最小生成树我喜欢用克鲁斯塔尔(kruskal)算法(主要是方便) kruskal算法求最小生成树的主要思想是贪心,其中也用到了并查集,时间复杂度也很低为O(E * lgE),可以解决诸如全村通路畅通工程问题,如hduoj1233 由于我对图的了解相对薄弱,所以只能拉来神犇的博客https://blog.youkuaiyun.com/luoshixian099/article/details/5190817...原创 2018-09-29 19:18:22 · 257 阅读 · 0 评论