![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
风中一颗松
慢慢学,慢慢看
展开
-
A - Jungle Roads POJ - 1251
A - Jungle RoadsPOJ - 1251The 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...原创 2018-09-17 18:27:18 · 219 阅读 · 0 评论 -
K - The Unique MST POJ - 1679
从前有两只猫。它们实在不知道该出什么题了。于是它们放弃了治疗,开始玩一个游戏:从乡镇地图中已有的道路里面删除一些道路,并且删除完毕后图仍然是连通的。在所有方案中,删除道路总长度最大的方案为最优方案。两只猫同时完成了这个游戏。它们都坚信自己是赢家。已知它们的完成方式不同,请判断有没有可能它们的实现方案都是最优的。 Input第一行是一个整数 t (1 <= t <= 2...原创 2018-09-19 13:18:51 · 209 阅读 · 0 评论 -
N - 畅通工程再续 HDU - 1875
相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小...原创 2018-09-18 19:54:24 · 157 阅读 · 0 评论 -
L - 还是畅通工程 HDU - 1233
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正...原创 2018-09-18 19:23:26 · 195 阅读 · 0 评论 -
I - Agri-Net POJ - 1258
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 spee...原创 2018-09-18 19:10:57 · 138 阅读 · 0 评论 -
H - Highways POJ - 1751
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-09-18 15:37:19 · 214 阅读 · 0 评论 -
G - Arctic Network POJ - 2349
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-09-18 15:34:50 · 203 阅读 · 0 评论 -
F - Truck History POJ - 1789
F - Truck HistoryPOJ - 1789 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 c...原创 2018-09-17 21:02:12 · 213 阅读 · 0 评论 -
E - QS Network ZOJ - 1586
E - QS NetworkZOJ - 1586In 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...原创 2018-09-17 20:21:22 · 166 阅读 · 0 评论 -
D - Constructing Roads POJ - 2421
D - Constructing RoadsPOJ - 2421There 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 a...原创 2018-09-17 20:04:22 · 284 阅读 · 0 评论 -
C - Building a Space Station POJ - 2031
C - Building a Space StationPOJ - 2031You 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 comput...原创 2018-09-17 19:22:19 · 209 阅读 · 0 评论 -
B - Networking POJ - 1287
B - NetworkingPOJ - 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 cable...原创 2018-09-17 19:19:20 · 155 阅读 · 0 评论 -
J - Borg Maze POJ - 3026
The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg civilization. E...原创 2018-09-19 17:08:14 · 132 阅读 · 0 评论