03 2022 档案

摘要:时隔一年再回来写这道题,发现的确好简单。 #include <bits/stdc++.h> using namespace std; using ll = long long; int z(char C) { return C - 'a'; } set<string> all; vector<int 阅读全文
posted @ 2022-03-31 15:50 Xxaj5 阅读(148) 评论(0) 推荐(0) 编辑
摘要:90行,调了俩小时,大约有以下坑点。 1.每个数字都可能正负出现,比如-0 0,-1 1,一开始以为一个数的正负只会出现一个。 2.当俩人都不出现在照片中,那么输出俩人就行 3.当其中一个人不在照片里的时候,那个不在照片里的人不用输出,一开始以为既然是情侣,所以不在照片里的那个那么肯定和自己的对象最 阅读全文
posted @ 2022-03-23 22:51 Xxaj5 阅读(70) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int n, g, k; cin >> n >> g >> k; vector<tuple<string, int>> score(n); 阅读全文
posted @ 2022-03-22 16:04 Xxaj5 阅读(21) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 100010; vector<int> g[N]; int main() { int n; cin >> n; int root = - 阅读全文
posted @ 2022-03-22 15:39 Xxaj5 阅读(24) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 10010, M = N * 2; vector<int> g[N]; int main() { int n, m; cin >> n 阅读全文
posted @ 2022-03-22 15:26 Xxaj5 阅读(22) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; constexpr int N = 2E4 + 10; int f[N]; int find(int x) { if (x != f[x]) return f[x] = find(f[x]); return 阅读全文
posted @ 2022-03-21 15:47 Xxaj5 阅读(20) 评论(0) 推荐(0) 编辑
摘要:并不一定是连通图 #include <bits/stdc++.h> using namespace std; vector<int> g[510]; int main() { int v, e, k; cin >> v >> e >> k; for (int i = 0; i < e; i++) { 阅读全文
posted @ 2022-03-21 11:48 Xxaj5 阅读(15) 评论(0) 推荐(0) 编辑
摘要:离谱,给的节点中可能还有多余的节点,谜语人 #include <bits/stdc++.h> using namespace std; #define val first #define nex second int main() { ios::sync_with_stdio(false); cin 阅读全文
posted @ 2022-03-21 11:11 Xxaj5 阅读(29) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<tuple<string, int, int>> all; for (int i = 0; i < n; i++) { string 阅读全文
posted @ 2022-03-19 17:37 Xxaj5 阅读(39) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 1e5 + 10; vector<int> G[N]; int main() { int n; double h, r; cin >> 阅读全文
posted @ 2022-03-19 15:02 Xxaj5 阅读(24) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int n; cin >> n; set<string> S; for (int i = 0; i < n; i++) { string 阅读全文
posted @ 2022-03-19 13:50 Xxaj5 阅读(22) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; #define e first #define c second constexpr double eps = 1e-8; int main() { int n; cin >> n; map<int, dou 阅读全文
posted @ 2022-03-19 13:36 Xxaj5 阅读(39) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n + 1); for (int i = 1; i <= n; i++) { cin >> a[i]; } sort(a 阅读全文
posted @ 2022-03-18 19:57 Xxaj5 阅读(33) 评论(0) 推荐(0) 编辑
摘要:要记得他父母也有性别 #include <bits/stdc++.h> using namespace std; constexpr int N = 1e5 + 10; vector<int> g[N]; int main() { int n, m; cin >> n; map<int, char> 阅读全文
posted @ 2022-03-18 19:40 Xxaj5 阅读(34) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n, k, m; cin >> n >> k >> m; vector<double> all; for (int i = 0; i < n; i++) { vector<i 阅读全文
posted @ 2022-03-17 20:52 Xxaj5 阅读(29) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v(n + 1); for (int i = 1; i <= n; i++) { cin >> v[i]; } vector 阅读全文
posted @ 2022-03-17 20:42 Xxaj5 阅读(59) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; constexpr int N = 510; vector<int> g[N]; int main() { int n, m; cin >> n >> m; for (int i = 0; i < m; i+ 阅读全文
posted @ 2022-03-17 19:47 Xxaj5 阅读(32) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n, q; cin >> n >> q; vector<int> v; make_heap(v.begin(), v.end(), greater<int>()); for 阅读全文
posted @ 2022-03-17 10:27 Xxaj5 阅读(15) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; const int N = 10110; struct Tree { int u, l, r; }TNode[N]; int midorder[N], preorder[N]; int main() { in 阅读全文
posted @ 2022-03-17 09:01 Xxaj5 阅读(36) 评论(0) 推荐(0) 编辑
摘要:#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 阅读(51) 评论(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 阅读(38) 评论(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 阅读(19) 评论(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 阅读(20) 评论(0) 推荐(0) 编辑
摘要:先建树,再BFS #include <bits/stdc++.h> using namespace std; vector<int> tree[35]; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; ve 阅读全文
posted @ 2022-03-15 21:35 Xxaj5 阅读(57) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<vector<int>> v; for (int i 阅读全文
posted @ 2022-03-15 20:29 Xxaj5 阅读(33) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } vector<int> 阅读全文
posted @ 2022-03-15 20:28 Xxaj5 阅读(37) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n, need; cin >> n >> need; vector<double> have(n); vector<double> price(n); for (int i 阅读全文
posted @ 2022-03-14 22:43 Xxaj5 阅读(23) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; bool st[100010]; int main() { ios::sync_with_stdio(false); cin.tie(0); string init; int n; cin >> init > 阅读全文
posted @ 2022-03-14 22:14 Xxaj5 阅读(26) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; const int N = 510; int val[N]; vector<pii> g[N]; int d 阅读全文
posted @ 2022-03-14 21:28 Xxaj5 阅读(33) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示