
并查集
文章平均质量分 78
dlnumk
这个作者很懒,什么都没留下…
展开
-
HDU 1213How Many Tables(基础并查集)
Problem Description Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the frien原创 2017-05-23 11:09:15 · 219 阅读 · 0 评论 -
HDU1272小希的迷宫(并查集)
Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。原创 2017-05-23 12:14:06 · 219 阅读 · 0 评论