![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
数据结构:并查集
数据结构:并查集
LSD20164388
如果你过几天就忘了,那么你并没有真正的掌握。
展开
-
2020 China Collegiate Programming Contest Qinhuangdao Site B. Bounding Wall(思维+并查集)
传送门B. Bounding Walltime limit per test4.0 smemory limit per test512 megabytesinputstandard inputoutputstandard outputAlex is a professional computer game player.These days, Alex is playing a war strategy game. His land is a rectangular grid with n r原创 2020-10-28 22:17:17 · 433 阅读 · 0 评论 -
Central Europe Regional Contest 2019 J. Saba1000kg (并查集+根号讨论)
链接:https://ac.nowcoder.com/acm/contest/7817/I来源:牛客网时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述There are many different streams in Viking rock movement. Old Icelandic granite rock, Mid- dle Danish dusty Viking rock,原创 2020-10-06 20:16:38 · 295 阅读 · 0 评论 -
ZOJ 3984 Graph Generator(2017CCPC秦皇岛 D)可撤销并查集+思维
题目传送门题意:T组数据,每组数据给你n(<=1e5)个点,m(<=min(1e5,n*(n-1)/2))条无向边,你需要构造一个合法的序列,其中每一项输出三个数:点x,你选择的点集的大小,然后给出这些点。(初始为空图,之后系统会增加一个新点x,并将x与你给出的这些点所在的连通块的每一个结点连边!)最后形成题中给你的图。问你是否存在合法方案,如果存在输出Yes和任意一种方案,否则输出No。思路:直接正着做找合法序列太难了,我们考虑从原图往下一个一个拆点,拆成一个合原创 2020-06-24 22:07:04 · 380 阅读 · 0 评论 -
POJ 2912 Rochambeau (路径压缩并查集)
RochambeauTime Limit: 5000MS Memory Limit: 65536K Total Submissions: 5619 Accepted: 1918 DescriptionN children are playing Rochambeau (scissors-rock-cloth) game with you. One o...原创 2019-02-20 15:15:03 · 288 阅读 · 0 评论 -
POJ 1984 Navigation Nightmare(带权并查集)
Navigation NightmareTime Limit: 2000MS Memory Limit: 30000K Total Submissions: 8001 Accepted: 2883 Case Time Limit: 1000MS DescriptionFarmer John's pastoral neighborhood has ...原创 2019-02-20 15:27:09 · 176 阅读 · 0 评论