摘要:
#include <bits/stdc++.h> using namespace std; constexpr int N = 110; int f[N]; int find(int x) { if (x != f[x]) return f[x] = find(f[x]); return f[x]; 阅读全文
posted @ 2022-03-16 20:04
Xxaj5
阅读(63)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; struct p { int id, money, cnt;}; vector<p> person(n + 1); for (int i = 1; 阅读全文
posted @ 2022-03-16 19:50
Xxaj5
阅读(45)
评论(0)
推荐(0)
摘要:
分两种情况枚举中间点 #include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); int n = s.size(); int res = 1; for (int i = 0; i < n; 阅读全文
posted @ 2022-03-16 19:24
Xxaj5
阅读(23)
评论(0)
推荐(0)
摘要:
//并查集 #include <bits/stdc++.h> using namespace std; constexpr int N = 10010; constexpr double eps = 1e-8; int f[N]; //int Size[N]; //集合的人数 vector<int> 阅读全文
posted @ 2022-03-16 17:25
Xxaj5
阅读(24)
评论(0)
推荐(0)

浙公网安备 33010602011771号