
最小生成树
追逐星辰的光
脚踏实地,虚心前行
展开
-
POJ - 2421 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 t原创 2017-12-28 21:23:42 · 248 阅读 · 0 评论 -
zoj 2048 - 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 constructed a numb原创 2018-01-24 12:28:14 · 336 阅读 · 0 评论 -
POJ 1679 The Unique MST
Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph原创 2018-01-24 10:37:29 · 200 阅读 · 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 o原创 2018-01-24 09:55:42 · 295 阅读 · 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 spa原创 2018-01-24 09:09:44 · 260 阅读 · 0 评论 -
POJ 1258 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 ordered a high spe原创 2018-01-24 08:37:05 · 230 阅读 · 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 p原创 2018-01-24 08:35:08 · 258 阅读 · 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原创 2018-01-23 23:11:58 · 203 阅读 · 0 评论 -
ZOJ - 1586 QS Network
In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each other via networks. If two QS want to get connected, they need to buy two network adapters原创 2018-01-23 22:33:17 · 221 阅读 · 0 评论 -
HDU - 1875 - 畅通工程再续
相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小原创 2018-01-23 22:06:55 · 206 阅读 · 0 评论 -
HDU - 1233 还是畅通工程
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 当N为0时,输入结束,该用例不被处理。 Output对每个测原创 2018-01-23 21:17:22 · 292 阅读 · 0 评论 -
POJ1789-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 tr原创 2018-01-24 13:05:08 · 219 阅读 · 0 评论