![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图的最小生成树
nucleare
这个作者很懒,什么都没留下…
展开
-
Networking (POJ - 1287)(并查集+最小生成树)
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 connect pairs of p...原创 2018-06-05 21:45:47 · 274 阅读 · 0 评论 -
A - 畅通工程 (prim+ 链式前向星)
省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input 测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( < 100 );随后的 N 行对应村庄间道路的成本...原创 2018-07-19 20:06:55 · 291 阅读 · 0 评论