
并查集
K_y
这个作者很懒,什么都没留下…
展开
-
poj 1611 The Suspects(并查集)
The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 33063 Accepted: 16027DescriptionSevere acute respiratory syndrome (SARS), an atypical pneu原创 2016-07-27 19:12:18 · 217 阅读 · 0 评论 -
POJ Colored Sticks 2513(字典树+并查集+欧拉回路)
Colored SticksTime Limit: 5000MS Memory Limit: 128000KTotal Submissions: 35376 Accepted: 9264DescriptionYou are given a bunch of wooden sticks. Each endpoint of e原创 2016-08-09 21:20:17 · 322 阅读 · 0 评论 -
POJ 1182 食物链 (关系型并查集)
题意就不说了在网上看了好多题解,好多都是用再加一个关系数组,可惜本弱鸡没看懂,找到了一种自己认为还挺好理解的方法。这种方法是:建一个3*N的并查集 1--N 表示同类 比如 pre[ 3 ]=4 ,表示3和4是同类 N+1--N*2 表示这个吃谁 比如 pre[ 2 ] = 1 ,表示2吃1 N*2+1 --N*3 表原创 2016-11-28 20:26:09 · 736 阅读 · 1 评论 -
POJ Find them, Catch them 1703 (关系型并查集)
Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42711 Accepted: 13146DescriptionThe police office in Tadu City decides to say ends原创 2016-11-28 21:03:08 · 506 阅读 · 1 评论