摘要:
带扩展域的并查集 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n, m; int p[N]; struct Node { int a, b; 阅读全文
posted @ 2022-08-16 21:18
wKingYu
阅读(30)
评论(0)
推荐(0)
摘要:
并查集 + 树的判定 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n; int p[N]; int find(int x) { if (p[ 阅读全文
posted @ 2022-08-16 17:22
wKingYu
阅读(37)
评论(0)
推荐(0)
摘要:
带扩展域的并查集 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n, m; int p[N]; int find(int x) { if (p 阅读全文
posted @ 2022-08-16 16:47
wKingYu
阅读(29)
评论(0)
推荐(0)
摘要:
并查集 + 树的判定 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e4 + 10; int n; int p[N]; int find(int x) { if (p[ 阅读全文
posted @ 2022-08-16 14:21
wKingYu
阅读(31)
评论(0)
推荐(0)

浙公网安备 33010602011771号