摘要:
Problem Description ice_cream's world is a rich country, it has many fertile lands. Today, the queen of ice_cream wants award land to diligent ACMers. 阅读全文
摘要:
先了解一下并查集 并查集由一个整数型的数组和两个函数构成。数组pre[]记录了每个点的前导点是什么,函数find是查找,join是合并。 int pre[1000 ]; int find(int x) //查找根节点 { int r=x; while ( pre[r ] != r ) //返回根节点 阅读全文