摘要: 带权并查集,用权值维护是不是属于同一类 #include <iostream> #include <algorithm> #include <cstring> using namespace std; const int N = 50010; int fa[N],d[N];//d[i]维护i到自己祖 阅读全文
posted @ 2021-04-02 11:18 lemonsbiscuit 阅读(52) 评论(0) 推荐(0) 编辑