codeforces
文章平均质量分 69
暴打丘丘人
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #748 (Div. 3) A/B/C/D1
题单 目录 A. Elections B. Make it Divisible by 25 C. Save More Mice D1. All are Same 总结: A. Elections 思路: 分类讨论。 代码: #include <bits/stdc++.h> typedef long long int LL; using namespace std; LL max(LL a,LL b,LL c) { LL maxn=max(a,b); m原创 2021-10-14 10:29:22 · 254 阅读 · 0 评论 -
Codeforces Round #747 (Div. 2) A/B/C/E1
题单 目录 A: B: C: A: 题意: 给出n,令[l,r]区间之和等于n,求 l与r。 思路: [l,r]=[-n+1,n] 代码: #include <bits/stdc++.h> #define bbn 200005 #define maxint 2147483647 #define maxLLint 9223372036854775807 #define mod 1000000007 //1e9+7 const double eps=1e-7; typedef原创 2021-10-09 13:44:44 · 281 阅读 · 0 评论 -
Educational Codeforces Round 114 (Rated for Div. 2) A/B/C/...
题单 Dashboard - Educational Codeforces Round 114 (Rated for Div. 2) - Codeforces A 题意: 给一个数n,打印n个2n长度的字符串,' ( ' 的数目时刻比' ) ' 的数目多或相等。 思路: 依次交换下标对应符号。 swap(n,n+1); swap(n-1,n); swap(n-2,n-1); swap(n-3,n-2); ... swap(1,2); 题解: #include <bits.原创 2021-09-22 09:30:24 · 285 阅读 · 0 评论 -
Codeforces Global Round 16 A/B/C/D1
Codeforces Global Round 16 题单 AC篇: A: 题意: 给出两个正数n,s,将s分割为n个非严格递增非负数,求中位数最大值。 思路: 使中位数左边(不包括中位数)全为0,右边(包括中位数)平均一下。 题解: #include <bits/stdc++.h> #define bbn 200005 #define maxint 2147483647 #define maxLLint 9223372036854775807 #define mod 10..原创 2021-09-13 07:40:27 · 290 阅读 · 0 评论 -
Educational Codeforces Round 113 (Rated for Div. 2) A/B/C/D
题目链接: A. Balanced Substring B. Chess Tournament C. Jury Meeting D. Inconvenient Pairs 目录 AC篇 A. Balanced Substring B. Chess Tournament 补题篇 C. Jury Meeting D. Inconvenient Pairs 总结: AC篇: A. Balanced Substring 题意: 给一个由字符‘a’ 与'b'组成的字符串。 找到一段'原创 2021-09-10 22:55:35 · 633 阅读 · 0 评论 -
Codeforces Deltix Round Summer 2021 [Div.1 + Div.2] problem-A-B题解
传送 1556A - A Variety of Operations 1556B - Take Your Places! 目录 A. A Variety of Operations B. Take Your Places! A. A Variety of Operations 解释: 题意:(0,0)->(a,b)需要几步。只有(+x,+x),(+x,-x),(-x,+x)三种运算; 分析:(0,0)->(a,b)需要几步等价与(a,b)->(0,0)需要几步。那么有相反原创 2021-08-30 08:21:44 · 1408 阅读 · 4 评论 -
Codeforces Round #738 (Div. 2)——C. Mocha and Hiking
问题: Codeforces Round #738 (Div. 2)——C. Mocha and Hiking 传送 问题描述: 1. 已知 (i)~(i+1) 可行(1<=i<=n-1) 2. 给出 (i)~(n+1)的关系 (1<=i<=n) a[i]=0:(i)~(n+1)可行。 a[i]=1:(n+1)~(i) 可行 。 3. 遍历所有点一次。 输出路径。(不存在则输出-1) 思路分析: 考虑三种情况。 1.(n+1)~(1)~(2)...原创 2021-08-16 08:53:29 · 451 阅读 · 0 评论
分享