2021年5月21日

并查集我知不道

摘要: #include <iostream> using namespace std; int set[10]; int find(int x)//找x的祖先 { if(set[x]==x) return x; return set[x]=find(set[x]);//把x的各个祖先的双亲都置最久远的祖先 阅读全文

posted @ 2021-05-21 09:05 ewitt 阅读(34) 评论(0) 推荐(0) 编辑

导航