![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
zuhiul
这个作者很懒,什么都没留下…
展开
-
hdu 1233 还是畅通工程
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整数,分别是两原创 2017-05-31 22:34:21 · 127 阅读 · 0 评论 -
hdu 6187 Destroy Walls
Long times ago, there are beautiful historic walls in the city. These walls divide the city into many parts of area.Since it was not convenient, the new king wants to destroy some of these walls, so he原创 2017-11-03 18:24:48 · 272 阅读 · 0 评论 -
poj 2349 Arctic Network
The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every ou原创 2017-06-15 22:29:31 · 135 阅读 · 0 评论 -
poj 1287 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 connect pairs of po原创 2017-06-15 22:06:43 · 130 阅读 · 0 评论 -
hdu 1102 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 connected, if and only if th原创 2017-06-15 21:55:46 · 178 阅读 · 0 评论 -
poj 1789 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 describing each type of a tru原创 2017-06-15 21:47:28 · 126 阅读 · 0 评论 -
poj 2031 Building a Space Station
You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.The space原创 2017-06-15 21:31:55 · 194 阅读 · 0 评论 -
hdu 1102 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 connected, if and only if th原创 2017-06-03 11:33:00 · 148 阅读 · 0 评论 -
poj 1251 Jungle Roads
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so原创 2017-06-01 17:10:49 · 173 阅读 · 0 评论 -
hdu 1233 还是畅通工程
传送门。某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,...原创 2018-02-15 10:12:16 · 110 阅读 · 0 评论