随笔分类 -  图论之最小生成树

51Nod - 1640 天气晴朗的魔法(并查集,生成树)
摘要:这样阴沉的天气持续下去,我们不免担心起他的健康。51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终... 阅读全文
posted @ 2018-04-27 10:10 zitian246 阅读(160) 评论(0) 推荐(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 communicatio... 阅读全文
posted @ 2018-04-26 16:59 zitian246 阅读(124) 评论(0) 推荐(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 ar... 阅读全文
posted @ 2018-04-26 15:09 zitian246 阅读(103) 评论(0) 推荐(0)
POJ - 1988-(带权并查集)
摘要:Farmer John and Betsy are playing a game with N (1 #include#includeusing namespace std;int m;int f[30500];int deep[30500]; //... 阅读全文
posted @ 2018-04-25 19:45 zitian246 阅读(96) 评论(0) 推荐(0)