并查集
文章平均质量分 71
YancyKahn
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Connections in Galaxy War(反向并查集)
题目链接上一种法:http://blog.youkuaiyun.com/qq_37753409/article/details/77922448. 提交后发现Runtime error. 查阅资料后,发现要是用反向并查集,在这里用反向并查集实现. 题目链接:https://vjudge.net/problem/ZOJ-3261 代码如下:#include <iostream> #include <cstd原创 2017-09-13 14:20:35 · 564 阅读 · 0 评论 -
A bug's life(带权并查集)
Description: Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the原创 2017-09-13 14:24:32 · 403 阅读 · 0 评论 -
How many tables?(简单并查集)
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 friends know原创 2017-09-13 14:26:46 · 371 阅读 · 0 评论 -
the suspect
Description: Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best s原创 2017-09-13 14:31:00 · 434 阅读 · 0 评论 -
Connections in Galaxy War
Description: In order to strengthen the defense ability, many stars in galaxy allied together and built many bidirectional tunnels to exchange messages. However, when the Galaxy War began, some tunnel原创 2017-09-10 15:26:45 · 493 阅读 · 0 评论 -
小希的迷宫.
Despriction 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计原创 2017-09-10 15:32:14 · 498 阅读 · 0 评论 -
Is it a tree?(和上一道小希的迷宫相同)
Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following propert原创 2017-09-10 15:35:36 · 337 阅读 · 0 评论
分享