随笔分类 -  题解

摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[105][105], dis[105]; bool vis[105]; queue < int > q; int main() { int n; cin >> n; fo 阅读全文
posted @ 2025-04-26 08:52 嵇若凌 阅读(28) 评论(0) 推荐(0)
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[105][105], in[105], out[105], cnt = 0; bool vis[105]; void dfs(int x) { vis[x] = 1; i 阅读全文
posted @ 2025-04-26 08:43 嵇若凌 阅读(30) 评论(0) 推荐(0)
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; bool islucky(int n) { string s; while (n) { s += n % 2 + '0'; n /= 2; } reverse(s.begin(), 阅读全文
posted @ 2025-04-26 08:37 嵇若凌 阅读(6) 评论(0) 推荐(0)
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[105][105]; int main() { int n; cin >> n; for (int i = 1;i <= n;i++) { int u, k; cin > 阅读全文
posted @ 2025-04-26 08:19 嵇若凌 阅读(20) 评论(0) 推荐(0)
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; long long a[100005]; int main() { int n, cnt = 1; while (cin >> n) { priority_queue < long 阅读全文
posted @ 2025-04-26 08:15 嵇若凌 阅读(21) 评论(0) 推荐(0)
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int ans[55], ans2[55]; int vis[55], vis2[55]; vector < int > a[55]; void dfs(int x) { vis[x 阅读全文
posted @ 2025-04-22 16:02 嵇若凌 阅读(6) 评论(0) 推荐(0)
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[15][25], f[15][25]; void dg(int dep, int max, int rest) { if (dep == 0) return; int i 阅读全文
posted @ 2024-12-27 14:40 嵇若凌 阅读(10) 评论(0) 推荐(0)