随笔分类 -  数据结构-启发式合并

摘要:"题目链接" 启发式合并就是~~暴力合并~~把小的合并到大的里,一个一个插进去。 并查集维护连通性,同时保证并查集的根就是所在Splay的根,这样能省去很多操作。 cpp include include using namespace std; inline int read(){ int s = 阅读全文
posted @ 2019-05-04 09:05 Qihoo360 阅读(237) 评论(1) 推荐(0)

You're powerful!