Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!

2012年7月3日

摘要: 并查集View Code 1 #include <cstdio> 2 #include <algorithm> 3 #include <cstring> 4 using namespace std; 5 6 const int N=20010; 7 int set[N],key[N],n; 8 int find(int x) 9 {10 if(x==set[x]) return x;11 int t=find(set[x]);12 key[x]^=key[set[x]];13 return set[x]=t;14 }15 bool merge(int x,i 阅读全文
posted @ 2012-07-03 13:09 Qiuqiqiu 阅读(351) 评论(0) 推荐(0) 编辑