
Codeforces
文章平均质量分 71
EagleEyeKestrel
2019-2020年度中国睡觉甲级联赛冠军
展开
-
Codeforces Round 704 Genius‘s Gambit
Codeforces Round 704 Genius’s Gambit给三个正整数a, b, k,要求找到两个二进制串x, y,使得:x, y都各有a个0和b个1x - y有k个1均不能具有前导0其中0≤a,1≤b,0≤k≤a+b≤2⋅1050\leq a, 1\leq b, 0\leq k\leq a+b\leq 2 \cdot 10^50≤a,1≤b,0≤k≤a+b≤2⋅105输入三个正整数,如果能找到,输出yes,以及两个串,否则输出no输入样例:4 2 3输出样例:Yes原创 2021-02-25 01:15:19 · 104 阅读 · 0 评论 -
Codeforces Round 703 D Max Median
Codeforces Round 703 D Max Median长度为n的数组a,求其中所有长度至少为k的子数组中,最大的中位数是多少?其中中位数的定义,是⌊n−12⌋\lfloor \frac{n-1}{2}\rfloor⌊2n−1⌋位置的元素(索引从0开始)。其中1≤k≤n≤2∗1051\leq k\leq n\leq 2 *10^51≤k≤n≤2∗105,1≤a[i]≤n1\leq a[i]\leq n1≤a[i]≤n。比赛的时候没想到,其实直接二分就可以了。假设要检查是否存在中位数大于等于x原创 2021-02-19 15:39:54 · 146 阅读 · 1 评论 -
Codeforces Round 701 Multiples and Power Differences
Multiples and Power Differences题目的大意是,给一个矩阵a,其中a的长宽是500范围的矩阵。现在要给出一个矩阵b,使得b的每个元素是a的倍数,并且,b矩阵里所有相邻元素的差的绝对值,都是一个完全四次方数(是某个正整数的四次方)。其中:1≤bij≤1061\leq b_{ij}\leq 10^61≤bij≤1061≤aij≤161\leq a_{ij}\leq 161≤aij≤16这是Div2的D题,当时毫无思路,也做不出来。当时想的是,这种做差感觉和裴蜀定理有原创 2021-02-14 17:41:45 · 129 阅读 · 0 评论 -
Codeforces Round699 Div2 C Fence Painting
Codeforces Round699 Div2 C Fence PaintingDiv2的C题,居然没做出来,真的菜。。大概意思是,给n个数aia_iai,是栅栏当前的颜色。再给n个数bib_ibi,是栅栏预期的颜色。再给m个数cic_ici,是依次可以修改的颜色,每次必须要修改一个栅栏的颜色。问最后能不能得到预期的颜色?样例输入:61 11115 21 2 2 1 11 2 2 1 11 23 32 2 22 2 22 3 210 57 3 2 1 7 9 4 2原创 2021-02-08 23:29:02 · 150 阅读 · 0 评论 -
Codeforces Round 697 Div3 G Strange Beauty
Strange BeautyPolycarp found on the street an array ???? of ???? elements.Polycarp invented his criterion for the beauty of an array. He calls an array ???? beautiful if at least one of the following conditions must be met for each different pair of indic原创 2021-01-27 23:33:42 · 210 阅读 · 0 评论 -
Codeforces Round 695 Div2
Codeforces Round 695 Div2C Three Bags有三个数组,三个数组的元素个数和不超过10510^5105量级。每次可以从两个不同数组中取两个数a和b,删除b,而a变成a-b。显然我们可以一直操作到最后使得三个数组只剩下一个元素,问剩下的这个元素的最大值?样例输入:2 4 11 26 3 4 55样例输出:20In the first example input, let us perform the following operations:[1,2],原创 2021-01-10 17:04:49 · 129 阅读 · 0 评论 -
Codeforces Round694 Div2
Codeforces Round694 Div2D Strange DefinitionD题没做出来。题意也比较复杂,n个数a1,a2,⋯ ,ana_1, a_2, \cdots, a_na1,a2,⋯,an。先上一个定义,如果正整数x和y满足,lcm(x,y)gcd(x,y)\frac{lcm(x,y)}{gcd(x,y)}gcd(x,y)lcm(x,y)是完全平方数,那么x和y邻近。每一时刻,aia_iai会变成数组中其他所有和它邻近的元素之积(包括自己,如果自己和自己邻近)。有qqq次查原创 2021-01-10 00:21:48 · 155 阅读 · 0 评论 -
Codeforces Round 693 (Div 3)
Codeforces Round 693(Div 3)F New Year’s Puzzle这里就不放原题目描述了。有2×n2\times n2×n的方格,我们有1×21\times21×2和2×12\times12×1的瓷砖,方格里有若干个点已经贴了瓷砖,问能否完美贴住?(瓷砖数量没有限制)输入:样例数t(1≤t≤104)t(1\leq t\leq 10^4)t(1≤t≤104)整数n和m,n是方格的长(宽永远是2),m是已经有的瓷砖数量。1≤n≤109,1≤m≤2×1051\leq n \le原创 2021-01-09 17:27:58 · 163 阅读 · 0 评论 -
Codeforces Round 690 (Div3)
Close TuplesThis is the hard version of this problem. The only difference between the easy and hard versions is the constraints on ???? and ????. In this version of the problem, you need to output the answer by modulo 10^9+7.You are given a sequence ????原创 2020-12-16 01:17:44 · 366 阅读 · 0 评论 -
Codeforces Round 689(Div.2) E题 Water Level
CF Round 689(Div2) Water LevelIn recent years John has very successfully settled at his new job at the office. But John doesn’t like to idly sit around while his code is compiling, so he immediately found himself an interesting distraction. The point of h原创 2020-12-12 02:26:31 · 250 阅读 · 0 评论 -
【Leetcode】周赛204 罗布乐思
Leetcode周赛204今天是周赛204,又是被吊打的一天。。重复至少K次且长度为M的模式 给你一个正整数数组 arr,请你找出一个长度为 m 且在数组中至少重复 k 次的模式。 模式 是由一个或多个值组成的子数组(连续的子序列),连续 重复多次但 不重叠 。 模式由其长度和重复次数定义。 如果数组中存在至少重复 k 次且长度为 m 的模式,原创 2020-08-30 17:47:08 · 503 阅读 · 0 评论 -
Codeforces Round #661 Div3 E1 Weights Division
Codeforces Round #661 Div3 E1 Weights Division (easy version)You are given a weighted rooted tree, vertex 1 is the root of this tree.A tree is a connected graph without cycles. A rooted tree has a special vertex called the root. A parent of a vertex ????原创 2020-08-06 23:34:06 · 197 阅读 · 0 评论 -
Codeforces Round 652 Div2
Codeforces Round 652 Div2Round652的题感觉就是想到了就容易实现,代码不是很复杂。但就这变成了打的最差的一次。。这里记录一下BCD题。B题 AccurateLeeLee was cleaning his house for the party when he found a messy string under the carpets. Now he’d like to make it clean accurately and in a stylish way…The原创 2020-06-24 13:36:05 · 468 阅读 · 0 评论 -
Codeforces Round651 D题 Odd-Even Subsequence
Codeforces Round651 D题 Odd-Even Subsequence题目是这样的:Ashish has an array ???? of size ????.A subsequence of ???? is defined as a sequence that can be obtained from ???? by deleting some elements (possibly none), without changing the order of the remaining原创 2020-06-22 23:39:07 · 217 阅读 · 0 评论