摘要: 最基础的并查集,使用数组完成,数组下标为节点的数值,数组中的数值表示节点的父亲 最基础的并查集代码如下: 1 #include<iostream> 2 using namespace std; 3 int f[10010]; 4 void init() 5 { 6 for (int i = 0; i 阅读全文
posted @ 2022-08-01 22:10 王小美O(∩_∩)O 阅读(42) 评论(0) 推荐(0)