![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并查集
文章平均质量分 84
utoppia
这个作者很懒,什么都没留下…
展开
-
sgu 174 Walls
174. Wallstime limit per test: 1.5 sec.memory limit per test: 32768 KBinput: standardoutput: standardPeople of country T-land lived on the big plain many years ago. It is happened原创 2012-11-07 19:53:19 · 619 阅读 · 0 评论 -
Ural 1003 Parity
PRO IS HERE大意:一段长度为n的路,已知m对信息,信息告诉你某两点之间的距离的奇偶,问你到哪个信息是错的。解答:明显的并查集,保存距离的奇偶,find的时候顺便跟新一下。。。我就是忘记了fa[x] = k查了n久的代码啊,弱菜就是弱啊。。。#include#include#include#include#include#i原创 2013-04-21 23:24:15 · 674 阅读 · 0 评论