
最小生成树
文章平均质量分 86
不如烂笔头
这个作者很懒,什么都没留下…
展开
-
HDU 1232--畅通工程
题目: Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( <原创 2016-08-19 23:16:38 · 341 阅读 · 0 评论 -
HDU 1233--还是畅通工程
题目: Description 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100原创 2016-08-19 23:20:53 · 295 阅读 · 0 评论 -
POJ 2485--Highways
题目: Description 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原创 2016-08-19 23:24:35 · 379 阅读 · 0 评论 -
POJ 1861--Network
题目: Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other us原创 2016-08-19 23:29:21 · 328 阅读 · 0 评论 -
POJ 2395--Out of Hay
题目: Description The cows have run out of hay, a horrible event that must be remedied immediately. Bessie intends to visit the other farms to survey their hay situation. There are N (2 <= N <原创 2016-08-19 23:34:01 · 372 阅读 · 0 评论