![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM--并查集
武当王也123
这个作者很懒,什么都没留下…
展开
-
HDU-1233畅通工程(并查集&最小生成树)
HDU-1233畅通工程(并查集&最小生成树) 主要用的是并查集 Problem Description 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整原创 2020-07-02 21:32:21 · 172 阅读 · 0 评论 -
More is better(并查集)
More is better Problem Description Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements. Mr Wang selected a room big enough to hold th原创 2020-07-02 21:26:41 · 267 阅读 · 0 评论