2013年8月18日
摘要: #include templateclass disj_set {public: disj_set(){ for (int i=0; i rank[y]) father[fy] = fx; else { father[fx] = fy; if (rank[fx] == rank[fy]) rank[fy]++; } }private: int father[size]; int rank[size];};int main() { ... 阅读全文
posted @ 2013-08-18 10:57 晴朗蝈蝈 阅读(123) 评论(0) 推荐(0) 编辑