
ACM_并查集
B12040331
一个人害怕寂寞,两个人害怕辜负。
展开
-
南邮OJ 1044 连通 OR 不连通
题目:连通 OR 不连通时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:250 测试通过:48描述给定一个无向图,一共n个点,请编写一个程序实现两种操作:D x y 从原图中删除连接x,y节点的边。Q x y 询问x,y节点是否连通输入第一行两个数n,m(5原创 2014-06-05 20:47:15 · 1172 阅读 · 0 评论 -
POJ 1611 The Suspects
题目:The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 22216 Accepted: 10804DescriptionSevere acute respiratory syndrome (SARS), an atypical原创 2014-08-03 00:30:06 · 710 阅读 · 0 评论 -
POJ 2492 A Bug's Life
POJ 2492 A Bug's Life 并查集原创 2014-08-02 21:00:15 · 1891 阅读 · 1 评论 -
POJ 1182 食物链
POJ 1182 食物链并查集经典题目原创 2014-08-02 22:25:12 · 1016 阅读 · 0 评论 -
POJ 1703 Find them, Catch them
题目:Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 31232 Accepted: 9621DescriptionThe police office in Tadu City decides to say原创 2014-08-03 00:52:20 · 921 阅读 · 0 评论 -
POJ 2524 Ubiquitous Religions
链接:http://poj.org/problem?id=2524解题思路:最简单的并查集的应用。代码:#include #include #include using namespace std;const int MAXN = 50010;int set[MAXN];int set_find(int p){ if(set[p] < 0) re原创 2014-03-31 18:33:41 · 709 阅读 · 0 评论 -
ACdream区域赛指导赛之手速赛系列(4) A Bad Horse
题目:Bad HorseTime Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others)SubmitStatisticNext ProblemProblem DescriptionAs the leader of the Evil League of Evil, Bad H原创 2014-08-08 21:40:20 · 1145 阅读 · 5 评论