图论基础之并查集的简单看法:HDU 1232 畅通工程&&More is better
摘要:
HDU 1232 畅通工程http://acm.hdu.edu.cn/showproblem.php?pid=1232第一个并查集的题目: 1 #include 2 #include 3 #include 4 using namespace std; 5 int father[1000]; 6 int Find(int a) 7 { 8 if(a!=father[a]) 9 return Find(father[a]);10 return father[a];11 }12 void Union(int a,int... 阅读全文