摘要: 期末周没啥时间,刷点水题 CF Problem - 271B - Codeforces(1300)(暴力枚举) 多练多练呀 突然发现欧拉筛的板子有一点点问题,没有考虑到1不是质数的情况 #include <bits/stdc++.h> using namespace std; #define LL 阅读全文
posted @ 2025-12-21 20:59 Seren_blingbling 阅读(2) 评论(0) 推荐(0)
摘要: CF Problem - 1455D - Codeforces 贪心,从小到大遍历 因为a[i]>x才能交换 所以把大的换小,使其满足单调不递减 #include <bits/stdc++.h> using namespace std; #define LL long long const LL m 阅读全文
posted @ 2025-12-01 22:22 Seren_blingbling 阅读(4) 评论(0) 推荐(0)
摘要: CF Problem - 1759E - Codeforces(dp好题) 这个问题是找最优方案下,吸收的最大人数 所以,首先排序,从小到大 然后对于每一个点(0~n-1),都计算其不使用或使用药水时的值 贪心思想,如果一旦满足大于a[i],就马上更新dp[x][y]值 所以,dp也是从x=2,y= 阅读全文
posted @ 2025-11-29 20:20 Seren_blingbling 阅读(2) 评论(0) 推荐(0)
摘要: CF Problem - 1766C - Codeforces(1300)(dp)(模拟) 一笔画,要经过所有黑色,并且有且仅有一次 不能经过白色 #include <bits/stdc++.h> using namespace std; #define LL long long const LL 阅读全文
posted @ 2025-11-28 22:09 Seren_blingbling 阅读(4) 评论(0) 推荐(0)
摘要: CF 构造(1300) Problem - 1867C - Codeforces(交互) #include <bits/stdc++.h> using namespace std; #define LL long long const LL mod = 998244353; const int N= 阅读全文
posted @ 2025-11-26 21:40 Seren_blingbling 阅读(4) 评论(0) 推荐(0)
摘要: CF 构造(1300) Problem - 1864C - Codeforces(lowbit) #include <bits/stdc++.h> using namespace std; #define LL long long const LL mod = 998244353; const in 阅读全文
posted @ 2025-11-25 23:33 Seren_blingbling 阅读(4) 评论(0) 推荐(0)
摘要: CF 构造(1300) Problem - 1889A - Codeforces #include <bits/stdc++.h> using namespace std; #define LL long long const LL mod = 998244353; const int N=2e5+ 阅读全文
posted @ 2025-11-24 20:08 Seren_blingbling 阅读(4) 评论(0) 推荐(0)
摘要: CF Problem - 1632C - Codeforces(枚举)(1600) 先加再按位或,一定最优 #include <bits/stdc++.h> using namespace std; #define LL long long const LL mod = 998244353; con 阅读全文
posted @ 2025-11-23 20:28 Seren_blingbling 阅读(2) 评论(0) 推荐(0)
摘要: CF Problem - 550C - Codeforces(数学) 能被8整除的数,后三位一定能被8整除 #include <bits/stdc++.h> using namespace std; #define LL long long const LL mod = 998244353; con 阅读全文
posted @ 2025-11-22 19:36 Seren_blingbling 阅读(6) 评论(0) 推荐(0)
摘要: CF Problem - 1234C - Codeforces(贪心) #include <bits/stdc++.h> using namespace std; #define LL long long const LL mod = 998244353; const int N=2e5+10; s 阅读全文
posted @ 2025-11-21 21:34 Seren_blingbling 阅读(4) 评论(0) 推荐(0)