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

2012年4月26日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3038好牛的并查集View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=200010; 6 int set[N],sum[N]; 7 int find(int x) 8 { 9 if(x==set[x]) return x;10 int t=find(set[x]);11 sum[x]+=sum[set[x]];12 return set[x]=t;... 阅读全文
posted @ 2012-04-26 21:52 Qiuqiqiu 阅读(135) 评论(0) 推荐(0) 编辑