![](https://img-blog.csdnimg.cn/db15ca82803e469f8b7b6a3bb8397f21.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
codeforces
文章平均质量分 94
本专题含有codeforces的多场题解
skynesser
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #781 (Div. 2)
Codeforces Round #781 (Div. 2)文章目录Codeforces Round #781 (Div. 2)A. GCD vs LCMB. Array Cloning TechniqueC. Tree InfectionD. GCD GuessA. GCD vs LCM题意:给定数n,找到a,b,c,d四个数满足下列条件:1.a+b+c+d=na+b+c+d=na+b+c+d=n2.gcd(a,b)=lcm(c,d)gcd(a,b)=lcm(c,d)gcd(a,b)=l原创 2022-04-09 12:04:09 · 3952 阅读 · 1 评论 -
Codeforces Round #780 (Div. 3)
Codeforces Round #780 (Div. 3)文章目录Codeforces Round #780 (Div. 3)A. Vasya and CoinsB. Vlad and CandiesC. Get an Even StringD. Maximum Product Strikes BackE. Matrix and ShiftsF1. Promising String (easy version)A. Vasya and Coins题意:小明有aaa枚1元硬币和bbb枚2元硬币,输原创 2022-04-01 10:16:07 · 787 阅读 · 5 评论 -
Codeforces Round #779 (Div. 2)(Permutationforces)
Codeforces Round #779 (Div. 2)(Permutationforces)文章目录Codeforces Round #779 (Div. 2)(Permutationforces)A. Marin and PhotoshootB. Marin and Anti-coprime PermutationC. Shinju and the Lost PermutationD1. 388535 (Easy Version)A. Marin and Photoshoot题意:给定一个原创 2022-03-28 10:29:43 · 859 阅读 · 2 评论 -
CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes) Editorial
CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!) Editorial文章目录CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!) EditorialA. Good PairsB. Subtract OperationC. Make Equal With ModE. Equal Tree SumsA. Good Pairs题意:给定一个长度为n的序列:a1,a2,…,an−1,ana_{1},a_{2原创 2022-03-25 13:07:47 · 718 阅读 · 7 评论 -
Educational Codeforces Round 125 (Rated for Div. 2)
A. Integer Moves题意:初始时在点(x,y) ,如果(x,y)与点(x1,y1)满足如下条件,那么可以从(x,y)转移至(x1,y1):即两点之间的距离为整数,即可转移。请你输出从(x,y)----->(0,0)的最小步数。 思路:我们可以证明,最大步数不会超过2:设初始点为(x,y) 我们可以选择这两种方案进行转移。 (x,y)-->(x,0)-->(0,0),(x,y)-->(0,y)-->(0,0) 显然沿...原创 2022-03-24 10:42:43 · 1231 阅读 · 0 评论 -
Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round)
目录A. Maximum Cake TastinessB. Prefix RemovalsC. Alice and the CakeA. Maximum Cake Tastiness题意:给定一段序列,长度为n:定义这个序列的值为:你可以进行一次操作,选择区间[ l, r ],并翻转区间内的数,使得序列的值最大。思路:找到序列中第二大的数,将它翻转到最大的数旁即可。即答案就是序列中最大数和次大数的和。时间复杂度: ...原创 2022-03-21 14:20:39 · 626 阅读 · 0 评论 -
Codeforces Round #713 (Div. 3)
目录A. Spy Detected!B. Almost RectangleC. A-B PalindromeD. Corrupted ArrayE. Permutation by SumF. EducationG. Short TaskA. Spy Detected!题意:给定长度为 的数组,该数组中除了一个数,其他所有数均相同,找到这个不同数的下标,总共有t 组数据。思路: 数据范围很...原创 2022-02-06 12:40:07 · 474 阅读 · 0 评论 -
Codeforces Round #677 (Div. 3)
A. Boring Apartments题意:存在一个有规律的数列1,11,111,1111,2,22,222,2222...9,99,999,9999。给定数列中的某个数x,询问该数(包括)前有几个数。思路:取出这个数的最后一位x,答案就是(x*4+当前数的位数)时间复杂度: O(logn)AC代码:void solve(){ int n; cin>>n; int k = n%10; int cnt = ...原创 2022-02-08 14:18:30 · 538 阅读 · 0 评论