WangMeow --- ᶘ ᵒᴥᵒᶅ ฅ^•ﻌ•^ฅ

欲穷算法千里目,更上编程一层楼!

排序:
默认
按更新时间
按访问量

【2018 “百度之星”程序设计大赛 - 初赛(B)】(1001) ---- degree (并查集)

题目链接 做法:一开始想复杂了。有一个地方很重要,此图一直保证是无向简单图。也就是说一个n个顶点的图中某点的度最多是是n-1 。其次,我们发现,我们可以先找这个简单图中有多少个连通块,找最多度的顶点所在的连通块,把其余连通块连接在这个顶点上,在最多减掉k条边,再连接上。所以答案一定为min(n...

2018-08-12 19:24:41

阅读数:26

评论数:0

[POJ](2236)Wireless Network ---- 并查集

Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers...

2017-12-10 18:16:17

阅读数:42

评论数:0

[POJ](2524)Ubiquitous Religions ---- 并查集

Description There are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding ou...

2017-12-10 15:24:24

阅读数:42

评论数:0

[POJ](1611)The Suspects ---- 并查集

Description Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003...

2017-12-10 14:35:00

阅读数:43

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭