并查集
李小三r
这个作者很懒,什么都没留下…
展开
-
zoj 1789 The Suspects (并查集)
并查集,一直wa,找了好长时间,才找到错误#include#includeint father[30005];int n,m,i,t,a,b,k,fa;int find(int x){ return father[x]==x?x:find(father[x])原创 2011-08-10 16:48:38 · 603 阅读 · 0 评论 -
hdu 1213 (并查集)
#include#include#include#include#includeusing namespace std;int father[1003];int find(int x){ return father[x]==x?x:find(father[x]原创 2011-08-10 10:57:23 · 348 阅读 · 0 评论