并查集
nenu_xlp
钢之心
展开
-
POJ 2524 Ubiquitous Religions
基础并查集原创 2014-05-02 18:45:16 · 462 阅读 · 0 评论 -
HDU 4496 D-City
2013年通化邀请赛D题 简单并查集原创 2014-05-02 18:50:30 · 523 阅读 · 0 评论 -
LA 3644 X-Plosives
基础并查集原创 2014-05-18 15:24:21 · 513 阅读 · 0 评论 -
LA 3027 Corporative Network
并查集原创 2014-05-18 18:53:36 · 513 阅读 · 0 评论 -
Codeforces 445B DZY Loves Chemistry
输出pow(2,n-v) v为联通块的数量 #include using namespace std; int sum; int f[120]; int find(int x) { if(f[x]!=x) f[x]=find(f[x]); return f[x]; } void make(int a,int b) { int f1=find(a);原创 2014-07-07 13:23:57 · 409 阅读 · 0 评论 -
POJ 1611 The Suspects(并查集)
并查集原创 2014-07-26 10:31:43 · 744 阅读 · 0 评论