
CF
文章平均质量分 78
xing_mo
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #699 (Div. 2)
Codeforces Round #699 (Div. 2) http://codeforces.com/contest/1481 A. Space Navigation 题意:给你一个字符串,串中字母分别表示在二维平面上往上下左右四个方向走一格,问是否能够删除一些字母使得从(0,0)出发走到(x,y) 思路:直接看最左最右,最上最下能到哪,然后看(x,y)是否在移动区间内 #include<bits/stdc++.h> #define MAXN 100005 using namespace s原创 2021-02-07 22:12:13 · 281 阅读 · 0 评论 -
Educational Codeforces Round 103 (Rated for Div. 2)
Educational Codeforces Round 103 (Rated for Div. 2) http://codeforces.com/contest/1476 K-divisible Sum 题意:给你n和k,需要构造一个长度为n的数组a(a中数都为正整数)使得所有数之和是k的倍数,要使得a中最大的数最小,问这个最小数是多少 思路:首先a全放1和为n,全放2合为2n,如果n >= k那么n~2n之间必有k的倍数,否则先全放⌊k/n⌋\lfloor k/n \rfloor⌊k/n⌋,之后选原创 2021-01-30 01:23:05 · 222 阅读 · 0 评论 -
Codeforces Round #628 (Div. 2)
Codeforces Round #628 (Div. 2) http://codeforces.com/contest/1325 A - EhAb AnD gCd #include<bits/stdc++.h> using namespace std; int t,x; int main() { scanf("%d",&t); while(t--) { scanf(...原创 2020-03-15 00:44:50 · 151 阅读 · 0 评论 -
Educational Codeforces Round 83 (Rated for Div. 2)
Educational Codeforces Round 83 (Rated for Div. 2) http://codeforces.com/contest/1312/my A - Two Regular Polygons 思路:m是n的因子即可 #include<bits/stdc++.h> using namespace std; int t,n,m; int main() {...原创 2020-03-14 02:38:10 · 145 阅读 · 0 评论 -
Codeforces Round #622 (Div. 2)
Codeforces Round #622 (Div. 2) http://codeforces.com/contest/1313 A - Fast Food Restaurant #include<bits/stdc++.h> using namespace std; int t,a[3]; int main() { scanf("%d",&t); while(t--) ...原创 2020-02-25 00:51:40 · 344 阅读 · 0 评论 -
Codeforces Round #620 (Div. 2)
Codeforces Round #620 (Div. 2) https://codeforces.com/contest/1304 A - Two Rabbits 思路:注意特判a+b等于0的情况就好 #include<bits/stdc++.h> using namespace std; int x,y,a,b; int main() { int t; scanf("%d",&...原创 2020-02-15 23:33:28 · 143 阅读 · 0 评论 -
Codeforces Round #619 (Div. 2)
Codeforces Round #619 (Div. 2) https://codeforces.com/contest/1301 A - Three Strings 思路:只要a[i],b[i]中的一个和c[i]相等,直接把另一个和c[i]换就好 #include<bits/stdc++.h> #define MAXN 105 using namespace std; char a...原创 2020-02-15 13:34:32 · 251 阅读 · 0 评论 -
Educational Codeforces Round 82 (Rated for Div. 2)
Educational Codeforces Round 82 (Rated for Div. 2) https://codeforces.com/contest/1303 A - Erasing Zeroes 思路:直接看最左边和最右边的1中间有多少个0 #include<bits/stdc++.h> using namespace std; int t; char s[105]; ...原创 2020-02-13 00:56:43 · 156 阅读 · 0 评论 -
Codeforces Round #618 (Div. 2)
Codeforces Round #618 (Div. 2) http://codeforces.com/contest/1300 A - Non-zero 思路:首先0就加到1,然后如果总和为0的话肯定有正数,将其中任意一个加1就好 #include<bits/stdc++.h> #define MAXN 105 using namespace std; int t,n,a[MAXN...原创 2020-02-10 00:42:13 · 157 阅读 · 0 评论 -
Codeforces Round #617 (Div. 3)
Codeforces Round #617 (Div. 3) A - Array with Odd Sum 思路:有奇偶数同时存在YES,只有奇数是n是奇数为YES,否则NO #include<bits/stdc++.h> #define MAXN 2005 using namespace std; int n,t; int main() { scanf("%d",&t); ...原创 2020-02-05 00:53:35 · 1554 阅读 · 0 评论 -
Codeforces Round #616 (Div. 2)
http://codeforces.com/contest/1291/my A - Even But Not Even 思路:先把末尾的偶数全部去掉,然后长度不为0的话看剩下的数字和是否为偶数,是的话直接输出,否则找一个奇数删去,注意不要有前导0 #include<bits/stdc++.h> using namespace std; int t,n; char s[3005]; in...原创 2020-02-03 01:39:03 · 153 阅读 · 0 评论 -
Educational Codeforces Round 81 (Rated for Div. 2)
Educational Codeforces Round 81 (Rated for Div. 2) http://codeforces.com/contest/1295 A. Display The Number 思路:首先位数越多越好,那么直接不断的填1,但是只剩3段可以点亮时在首位填个7比较好 #include<bits/stdc++.h> using namespace std...原创 2020-01-30 01:20:58 · 3331 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2)
Educational Codeforces Round 80 (Rated for Div. 2) https://codeforces.com/contest/1288 A. Deadline 思路:先不看取顶符号,求一次导发现大概在d\sqrt{d}d左右达到最小值,再在两边找最小值即可 #include<bits/stdc++.h> using namespace std; ...原创 2020-01-15 01:07:59 · 239 阅读 · 0 评论 -
Codeforces Round #613 (Div. 2)
Codeforces Round #613 (Div. 2) https://codeforces.com/contest/1285 A. Mezo Playing Zoma 直接输出n+1 B. Just Eat It! 题意:A获得的代价是所有a[i]之和,B获得的是a数组中任选一段的和的最大值,问A获得的代价是否严格大于B 思路:首先令dp[i]为选取a[i]能够获得的最大代价,可以由dp[...原创 2020-01-11 10:41:44 · 229 阅读 · 0 评论