上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: SMU Summer 2023 Contest Round 1 A - The Contest 思路:求出最短解决问题总时间,在所有区间找出大于等于总时间的最短时刻。 #include<bits/stdc++.h> using namespace std; #define int long long 阅读全文
posted @ 2023-07-14 19:25 bible_w 阅读(3) 评论(0) 推荐(0) 编辑
摘要: SMU Summer 2023 Contest Round 3 A - Curriculum Vitae 思路:要求0后不能有1,当某个数都不删时,值为前面所有的0的个数加后面所有1的个数,求出最大即可 #include<bits/stdc++.h> using namespace std; #de 阅读全文
posted @ 2023-07-14 19:25 bible_w 阅读(6) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 874 (Div. 3) A - Musical Puzzle 思路:记录两个长度字符串的种数 #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pair<s 阅读全文
posted @ 2023-05-26 09:54 bible_w 阅读(61) 评论(0) 推荐(0) 编辑
摘要: Educational Codeforces Round 149 (Rated for Div. 2) A - Grasshopper on a Line 思路:只有两种情况,x整除k时为x-1和1,否则为x void solve() { int x, k; cin >> x >> k; if (x 阅读全文
posted @ 2023-05-26 08:49 bible_w 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 2023 (ICPC) Jiangxi Provincial Contest -- Official Contest A - Drill Wood to Make Fire 思路:n>=s*v B - Wonderful Array 思路:对a进行a%m,不会对结果造成影响,则0<=bi+1-bi< 阅读全文
posted @ 2023-05-24 23:22 bible_w 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 2023 CCPC Henan Provincial Collegiate Programming Contest A 思路:暴力枚举 #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pai 阅读全文
posted @ 2023-05-18 10:33 bible_w 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 873 (Div. 2) A - Divisible Array 思路:每个数为i时都为i的倍数,前n个数和为Sn=n*(n+1)/2,可知每个数再乘n,Sn必为n的倍数 #include<bits/stdc++.h> using namespace std; ty 阅读全文
posted @ 2023-05-16 12:55 bible_w 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 2023 SMU RoboCom-CAIP 选拔赛 A - 小斧头 思路: 70分 由于区间范围越大,最大值越大,st表存区间最大值,枚举bi的值作为[l,r]内最大值,可用二分求出l,r的范围(左边求小于bi,右边求小于等于bi,这样可以得到所有的可能) #include<bits/stdc++. 阅读全文
posted @ 2023-05-11 21:30 bible_w 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 2023 Hubei Provincial Collegiate Programming Contest C - Darkness I 思路:对于n,m相同的情况,最小的是取对角线上的格子,为min(n,m);对于n,m不相同的情况,最小的是先取可形成的最大的正方形,为min(n,m),对于剩余的a 阅读全文
posted @ 2023-05-09 23:32 bible_w 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 871 (Div. 4) A - Love Story #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pair<string,int>PSI; const 阅读全文
posted @ 2023-05-07 12:42 bible_w 阅读(82) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页