上一页 1 2 3 4 5 6 7 8 9 10 ··· 30 下一页
摘要: 并没有说根是谁 #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; const int N = 1E5 + 10; vector<int> g[N]; int depth[N]; bool flag[N] 阅读全文
posted @ 2022-04-13 11:33 Xxaj5 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 需要注意的地方: 我们只记录维京人的祖先,除了维京人的其他人不能记录它的祖先 #include <bits/stdc++.h> using namespace std; struct people { string name, familyname; char gender; }; map<stri 阅读全文
posted @ 2022-04-13 10:50 Xxaj5 阅读(39) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; bool isyifu[10010]; bool isunhappy[10010]; bool ishappy[10010]; int tran(int x) { int res = 0; while (x) 阅读全文
posted @ 2022-04-12 17:15 Xxaj5 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 时隔一年再回来写这道题,发现的确好简单。 #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 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 90行,调了俩小时,大约有以下坑点。 1.每个数字都可能正负出现,比如-0 0,-1 1,一开始以为一个数的正负只会出现一个。 2.当俩人都不出现在照片中,那么输出俩人就行 3.当其中一个人不在照片里的时候,那个不在照片里的人不用输出,一开始以为既然是情侣,所以不在照片里的那个那么肯定和自己的对象最 阅读全文
posted @ 2022-03-23 22:51 Xxaj5 阅读(66) 评论(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 阅读(17) 评论(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 阅读(21) 评论(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 阅读(21) 评论(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 阅读(17) 评论(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 阅读(13) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 30 下一页