摘要: 并查集,记录该记录的,并且在适时的时候修改该修改的,就可以了。2015.10.5:hahahah#include#include#includeusing namespace std;#define N 10010struct node{ int cou; int fa; int ... 阅读全文
posted @ 2015-09-25 20:53 buzhidaohahaha 阅读(138) 评论(0) 推荐(0)
摘要: 最简单的并查集。2015.10.5:hahaha#include#include#includeusing namespace std;#define N 1010int fa[N];int root(int x){ if(fa[x]==x){ return x; } ... 阅读全文
posted @ 2015-09-25 20:12 buzhidaohahaha 阅读(116) 评论(0) 推荐(0)
摘要: 今天算是真正写了一会最小生成树,以前都只是看看觉得,嗯,会了,就一闪而过。参考代码:http://acm.hdu.edu.cn/discuss/problem/post/reply.php?postid=6133&messageid=1&deep=0(活着的意义……是在你快死的瞬间划过你脑海的那些事... 阅读全文
posted @ 2015-09-25 20:00 buzhidaohahaha 阅读(240) 评论(0) 推荐(0)