摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 2e5 + 10; int n, m; int p[N]; unordered_map<int,int> s; struct 阅读全文
posted @ 2022-07-16 11:37
wKingYu
阅读(44)
评论(0)
推荐(0)
摘要:
并查集 + 01背包 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n, m, k; int p[N]; int v[N], w[N]; in 阅读全文
posted @ 2022-07-16 11:05
wKingYu
阅读(44)
评论(0)
推荐(0)
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n, m; int p[N]; int find(int x) { if (p[x] != x) 阅读全文
posted @ 2022-07-16 10:52
wKingYu
阅读(40)
评论(0)
推荐(0)

浙公网安备 33010602011771号