摘要:
Goals, Goals! Everywhere 先考虑最大的情况,那就是没有助攻,全是进球,观察样例,发现好像最小进球数好像就是最大数除以 \(2\),但是有一种特殊情况,就是最大的那个球员比剩下的球员加起来还多(C罗和国足) #include <bits/stdc++.h> using name 阅读全文
posted @ 2024-09-23 11:47
libohan0518
阅读(55)
评论(0)
推荐(0)
摘要:
鸭棋 大模拟,实在不知道思维上有啥难的,就是难写!!!!!!!!!!!!!!!!!!!!! #include <bits/stdc++.h> using namespace std; struct chess { string color, type; } chessboard[10][9]; st 阅读全文
posted @ 2024-09-23 11:31
libohan0518
阅读(56)
评论(0)
推荐(0)
摘要:
Increase/Decrease/Copy 我们可以先将 \(a_i\) 变为 \(b_i\),统计在变化的过程中与 \(b_{i + 1}\)的最少差值即可 #include <bits/stdc++.h> using namespace std; #define int long long c 阅读全文
posted @ 2024-09-23 11:25
libohan0518
阅读(44)
评论(0)
推荐(0)
摘要:
天天爱跑步 假设现在又一棵树 如果一个人要从 \(3\) 跑到 \(5\),那么如果在 \(2\) 点的观察员要满足 \(w[2] = dep[2] - dep[3]\),如果在点 \(4\) 的观察员要满足 \(w[4] = dep[fa[lca]] - dep[3] + dep[lca] - d 阅读全文
posted @ 2024-09-23 11:06
libohan0518
阅读(19)
评论(0)
推荐(0)
摘要:
Minimum MEX 用双指针,如果 \(mex\) 小于了就往大扩展 #include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; int t, n, a[N], cnt[N] 阅读全文
posted @ 2024-09-23 10:37
libohan0518
阅读(38)
评论(0)
推荐(0)

浙公网安备 33010602011771号