#ifndef DisjointSet_H__ #define DisjointSet_H__ #include #include namespace meow{ class DisjointSet{ private: size_t n; std::vector father; std::vector depth; // size_t _root(size_t now); size_t _merge(size_t a, size_t b); public: DisjointSet(); DisjointSet(size_t _n); DisjointSet(DisjointSet const& dsj); // size_t root (size_t a ) const; size_t size ( ) const; // void reset(size_t _n ); size_t merge(size_t a, size_t b); }; /********************************************************* @asciidoc === meow:: *DisjointSet* (C++ class) .Description `DisjointSet` is a lighting data structure that maintain N numbers from *0* to *N-1* with methods below: [options="header",width="100%",cols="1>,1