摘要: // 任意合并两个不相交集合 void unionSets( int root1, int root2 ) { s[ root2 ] = root1; } // 寻找 x 所在集合 int find( int x ) const { if( s[ x ] < 0 ) return x; else r 阅读全文
posted @ 2020-03-04 16:32 白小白2020 阅读(298) 评论(0) 推荐(0)