随笔分类 -  codeforces总结

打codeforces的赛后总结
摘要:CodeTON Round 9 (Div. 1 + Div. 2) 总结 A 自己推一下就能出来的,输出奇数即可。 因为要递增,所以尽可能取小的数字。 i=1,余数肯定是 0,尽可能小,所以 a1=1i=2,余数尽可能小且不重,是 1,所以 \(a_1= 阅读全文
posted @ 2024-11-25 16:38 zhouruoheng 阅读(20) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 984 (Div. 3) 总结 https://codeforces.com/contest/2036 A 按题意模拟判断一下即可。 #include <iostream> #include <cstdio> #include <cstring> #include 阅读全文
posted @ 2024-11-22 13:41 zhouruoheng 阅读(11) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 988 (Div. 3) 总结 A 没啥好说的,用桶存出现次数。 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #incl 阅读全文
posted @ 2024-11-18 11:24 zhouruoheng 阅读(112) 评论(0) 推荐(2) 编辑
摘要:Codeforces Round 986 (Div. 2) 总结 A 按题意模拟即可,因为 n,a,b 很小,可以多循环几遍来判断。只循环十遍的吃罚时 qwq。 #include <iostream> #include <cstdio> #include <cstring> #include 阅读全文
posted @ 2024-11-16 23:38 zhouruoheng 阅读(62) 评论(0) 推荐(0) 编辑
摘要:Refact.ai Match 1 (Codeforces Round 985) 总结 A 集合中的元素为 lxr,有 kx 的倍数在其中才可删,可以求出最大可删的元素,直接计算。 #include <iostream> #include <cstd 阅读全文
posted @ 2024-11-16 22:02 zhouruoheng 阅读(30) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 987 (Div. 2) 总结 A 常见的套路,将一个序列变为不下降序列所需要改变的值的最小数量,考虑最大能保留多少个,显然是求最长上升子序列,而这题给出的 a 序列保证不上升,所以只需要考虑相同长度的一段。 #include <iostream> #inc 阅读全文
posted @ 2024-11-16 10:06 zhouruoheng 阅读(78) 评论(0) 推荐(0) 编辑
摘要:Educational Codeforces Round 170 (Div. 2) 总结 不想写,只有代码记录。 A #include <iostream> #include <cstring> #include <algorithm> #include <cstdio> using namespa 阅读全文
posted @ 2024-10-30 21:14 zhouruoheng 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 982 (Div. 2) 总结 A 猜结论,最后的图形的周长都能移成一个长方形的周长,这个长方形就是 wh 的最大值。 #include <iostream> #include <cstdio> #include <cstring> #incl 阅读全文
posted @ 2024-10-30 21:05 zhouruoheng 阅读(15) 评论(0) 推荐(1) 编辑
摘要:Educational Codeforces Round 171 (Div. 2) A 猜结论,两条边的最小值最大时,两条边相等。所以取 min(x,y) 为边长的正方形,对角线就是所求。 #include <iostream> #include <cstring> #include <al 阅读全文
posted @ 2024-10-29 23:34 zhouruoheng 阅读(12) 评论(0) 推荐(1) 编辑
摘要:Codeforces Global Round 27 总结 A 将红色的位置 (r,c) 移走,分为三块来考虑,蓝色的块移动 mc,黄色的块移动 m(nr),绿色的块移动 (m1)(nr)。 #include <iostream> #include <cs 阅读全文
posted @ 2024-10-29 23:06 zhouruoheng 阅读(40) 评论(0) 推荐(1) 编辑
摘要:Codeforces Round 981 (Div. 3) 总结 A 手推一下,发现位置变化为 1,2,3,4,,所以只需要看 n 的奇偶性即可。 #include <iostream> #include <cstdio> #include <cstring> #in 阅读全文
posted @ 2024-10-28 00:10 zhouruoheng 阅读(36) 评论(0) 推荐(2) 编辑
摘要:Codeforces Round 972 (Div. 2) 总结 A #include <bits/stdc++.h> using namespace std; int n; char a[]={'a','e','i','o','u'}; void solve() { cin>>n; int x=n 阅读全文
posted @ 2024-10-24 21:12 zhouruoheng 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 980 (Div. 2) 总结 A 简单小学算数题。 如果 ba,直接输出 a。 否则,列方程 ax=b2xx=ba,输出 ax,即 2ab。 #include <iostream> #inclu 阅读全文
posted @ 2024-10-24 11:10 zhouruoheng 阅读(26) 评论(0) 推荐(1) 编辑
摘要:Codeforces Round 979 (Div. 2) 总结 A 首先第一位的贡献一定是 0,然后考虑接下来 n1 位,我们可以把最大值和最小值放在第一位和第二位,这样贡献就是 (maxmin)×(n1)。 #include <iostream> #i 阅读全文
posted @ 2024-10-21 14:46 zhouruoheng 阅读(33) 评论(0) 推荐(0) 编辑
摘要:CF1907总结 A. Rook 题面翻译 给出车在国际象棋棋盘中的位置,输出其可到达的坐标(不必在意顺序)。 车可以横着或竖着走任意格数。 分析 题意明了,输出车所在行和列所有格子的序号(除车所在位置外)。 code #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2023-12-17 16:09 zhouruoheng 阅读(67) 评论(0) 推荐(1) 编辑
摘要:CF1894 总结 T1 题目大意: A,B两人玩游戏,游戏规则如下: 整场游戏有多轮,每轮游戏先胜 X 局的人获胜,每场游戏先胜 Y 局的人获胜。 你在场边观看了比赛,但是你忘记了 xy ,只记得总共比了 1n20 局,和每局获胜的 阅读全文
posted @ 2023-12-03 15:37 zhouruoheng 阅读(39) 评论(0) 推荐(1) 编辑

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