随笔分类 -  最小生成树

poj 1679 The Unique MST(次最小生成树)
摘要:DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirec... 阅读全文
posted @ 2014-08-06 22:53 Unico 阅读(130) 评论(0) 推荐(0)
hdu 3371 Connect the Cities(最小生成树)
摘要:Problem DescriptionIn 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but m... 阅读全文
posted @ 2014-08-06 21:32 Unico 阅读(117) 评论(0) 推荐(0)
hdu 2988 Dark roads(最小生成树)
摘要:DescriptionEconomic times these days are tough, even in Byteland. To reduce the operating costs, the government of Byteland has decided to optimize th... 阅读全文
posted @ 2014-08-06 20:21 Unico 阅读(198) 评论(0) 推荐(0)
hdu 1301 Jungle Roads(最小生成树)
摘要:Problem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between vil... 阅读全文
posted @ 2014-08-06 15:48 Unico 阅读(113) 评论(0) 推荐(0)
hdu 1213 How Many Tables(并查集)
摘要:Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at ... 阅读全文
posted @ 2014-08-06 14:40 Unico 阅读(98) 评论(0) 推荐(0)
hdu 1232 畅通工程(最小生成树)
摘要:Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input测试输入包含若干测试用例... 阅读全文
posted @ 2014-08-06 14:10 Unico 阅读(139) 评论(0) 推荐(0)
hdu 1233 还是畅通工程(最小生成树)
摘要:Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若... 阅读全文
posted @ 2014-08-06 11:27 Unico 阅读(98) 评论(0) 推荐(0)
hdu 1863 畅通工程(最小生成树)
摘要:Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。Input测试输入包含若干... 阅读全文
posted @ 2014-08-06 10:43 Unico 阅读(118) 评论(0) 推荐(0)
hdu 1875 畅通工程再续 (最小生成树)
摘要:Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在... 阅读全文
posted @ 2014-08-06 10:32 Unico 阅读(118) 评论(0) 推荐(0)
hdu 1162 Eddy's picture(最小生成树)
摘要:Problem DescriptionEddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his smal... 阅读全文
posted @ 2014-08-06 10:15 Unico 阅读(113) 评论(0) 推荐(0)
hdu 1102 Constructing Roads( 最小生成树 + 并查集)
摘要:Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to e... 阅读全文
posted @ 2014-08-06 09:29 Unico 阅读(181) 评论(0) 推荐(0)