并查集
K_y
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 1611 The Suspects(并查集)
The Suspects Time Limit: 1000MS Memory Limit: 20000K Total Submissions: 33063 Accepted: 16027 Description Severe acute respiratory syndrome (SARS), an atypical pneu原创 2016-07-27 19:12:18 · 242 阅读 · 0 评论 -
POJ Colored Sticks 2513(字典树+并查集+欧拉回路)
Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 35376 Accepted: 9264 Description You are given a bunch of wooden sticks. Each endpoint of e原创 2016-08-09 21:20:17 · 341 阅读 · 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 · 783 阅读 · 1 评论 -
POJ Find them, Catch them 1703 (关系型并查集)
Find them, Catch them Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 42711 Accepted: 13146 Description The police office in Tadu City decides to say ends原创 2016-11-28 21:03:08 · 548 阅读 · 1 评论
分享