![](https://img-blog.csdnimg.cn/20190918140037908.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
最小生成树
c++实现
BUPT留白
从模仿到超越,我还在路上!仍需努力,砥砺前行!
展开
-
Truck History
J - Truck History Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code d原创 2017-08-04 13:01:38 · 225 阅读 · 0 评论 -
A - 还是畅通工程
A - 还是畅通工程 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 当N为0时,输入结束,该用例不被处理原创 2017-08-03 22:48:57 · 209 阅读 · 0 评论 -
C - Networking
C - 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 tha原创 2017-08-03 22:54:46 · 229 阅读 · 0 评论 -
Highways
Highways 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 pr原创 2017-08-03 22:50:56 · 223 阅读 · 0 评论 -
D - 畅通工程
D - 畅通工程 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( 行对应村庄间道原创 2017-08-04 12:51:49 · 298 阅读 · 0 评论 -
E - Highways
E - Highways The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already原创 2017-08-04 12:54:45 · 204 阅读 · 0 评论 -
F - 畅通工程再续
F - 畅通工程再续 相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。原创 2017-08-04 12:56:26 · 214 阅读 · 0 评论 -
G - Agri-Net
G - 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 J原创 2017-08-04 12:58:02 · 207 阅读 · 0 评论 -
H - Constructing Roads
H - 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原创 2017-08-04 13:00:13 · 251 阅读 · 0 评论