![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforce题解
文章平均质量分 96
kitalekita
如果你觉得自己很菜,请你努力,因为你不努力更菜
展开
-
CodeForces-1438D Powerful Ksenia(构造)
Powerful Ksenia(构造)题目链接Problem statmentKsenia has an array aaa consisting of nnn positive integers a1,a2,…,ana_1, a_2, \ldots, a_na1,a2,…,an.In one operation she can do the following:choose three distinct indices i,j,ki, j, ki,j,k, and thenchange原创 2021-10-26 09:42:43 · 187 阅读 · 0 评论 -
10-28
Dubious Cyrpto题目的大致意思为:已知正整数 l, r, m 求任意一组 a, b, c 使得存在正整数 n 满足 n * a + b - c = m 且a, b, c 均在 [l, r] 这个范围之内,让你构造一个a,b,c使得na+b-c==m。题解: 这道题它确保了至少有一个a,b,c能够使得na+b-c=m,所以我只要让c=l,或者c=r,然后去遍历一遍l到r之间的值就行了。#include<cstdio>#include<cstring>#in原创 2020-10-28 14:19:10 · 213 阅读 · 0 评论 -
Codeforces Round #669 (Div. 2) A,B题解
A. AhahahahahahahahaAlexandra has an even-length array a, consisting of 0s and 1s. The elements of the array are enumerated from 1 to n. She wants to remove at most n2 elements (where n — length of array) in the way that alternating sum of the array will原创 2020-09-10 22:36:01 · 235 阅读 · 0 评论 -
Codeforces Round #666 A,B题解(Div. 2)
A——Juggling Letters这道题目的大致意思就是给T组数据,每组有n行字符串,让你去判断这n行字符串中进行个别字母的移动,是否是这n行字符串变成一样。思路:这n行字符串的字母可以随便移动,那么我们只需要去判断这n行字符串所含的各个字母数%n是否等于0,如果等于就输出“YES”,反之输出“NO”。代码如下:#include<algorithm>#include<cstdio>#include<iostream>#include<queue&g原创 2020-08-31 18:58:27 · 177 阅读 · 0 评论