![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM-并查集
文章平均质量分 81
4546love
这个作者很懒,什么都没留下…
展开
-
HDU 3038 How Many Answers Are Wrong
http://acm.hdu.edu.cn/showproblem.php?pid=3038#includeusing namespace std;#define N 200001int a,b,k;struct node{ int father; int len;}p[N];void init(int n){ for(int i=0;i<=n;i++){原创 2011-06-27 14:34:00 · 983 阅读 · 0 评论 -
HDU 2586 How far away ?
http://acm.hdu.edu.cn/showproblem.php?pid=2586#includeusing namespace std;#define N 40001#define M 201struct edge{ int next,v,w; edge(){}; edge(int a,int b,int c){ next=a;v=b;w=c;原创 2011-06-30 22:16:00 · 866 阅读 · 0 评论 -
HDU 3367 Pseudoforest
http://acm.hdu.edu.cn/showproblem.php?pid=3367#include using namespace std; #include #define N 10001 #define M 100001 int bin[N];原创 2011-07-03 12:16:26 · 876 阅读 · 0 评论