![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
——1. Kruskal算法
zitian246
左耳靠近心脏,甜言蜜语要说给左耳听。
展开
-
POJ - 2395 Out of Hay
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 <= 2,000) farms (numbered 1原创 2017-07-20 15:36:00 · 193 阅读 · 0 评论 -
51Nod - 1640 天气晴朗的魔法(并查集,生成树)
这样阴沉的天气持续下去,我们不免担心起他的健康。51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终的效果取决于阵中所有魔法链的魔力值的和。由于逆天改命的魔法过于暴力,所以我们要求阵中的魔法链的魔力值最大值尽可能的小,与此同时,魔力...原创 2018-04-27 10:09:50 · 165 阅读 · 0 评论 -
POJ - 2349&UVA - 10369 --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-04-26 16:58:35 · 204 阅读 · 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 speed...原创 2018-04-26 15:09:14 · 215 阅读 · 0 评论 -
POJ - 1988-(带权并查集)
Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to perform ...原创 2018-04-25 19:45:26 · 171 阅读 · 0 评论 -
POJ - 1751 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原创 2017-07-18 16:29:55 · 270 阅读 · 0 评论 -
HDU - 1875 畅通工程再续
某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实原创 2017-07-21 19:08:22 · 271 阅读 · 0 评论 -
HDU - 1272 小希的迷宫
上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的原创 2017-07-20 16:01:17 · 332 阅读 · 0 评论 -
HDU - 1598 find the most comfortable road
XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提速/降速,痛苦呀 ), 但XX星人对时原创 2017-07-20 14:56:08 · 188 阅读 · 0 评论