
codeforce周赛
文章平均质量分 86
能工智人小辰
在读研究生,没事学点算法
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round 1040 (Div. 2) A-D
给你一个集合,每次你可以进行如下操作:选择一个子集,并将其变成这个子集的mex选择一个子集,并将其变成这个子集的总和问在进行任意次操作后,这个集合最后剩下的最大的数是多少。原创 2025-08-04 16:05:04 · 867 阅读 · 0 评论 -
Codeforces Round 1039 (Div. 2) A-C
给你n个垃圾袋,每个垃圾袋有一个重量在每秒钟,你可以选择一个垃圾袋,如果他的重量小于等于c,那么你可以不花费硬币丢掉它当你丢掉一个垃圾袋后,其他垃圾袋在这一秒重量会翻倍问最少花费几个硬币可以丢掉所有垃圾袋。原创 2025-08-02 23:25:41 · 400 阅读 · 0 评论 -
Educational Codeforces Round 181 (Rated for Div. 2) A-C
给你一个串,要求串内不能出现FFT或者NTT。原创 2025-08-02 20:23:16 · 324 阅读 · 0 评论 -
Codeforces Round 1016 (Div. 3) A-F
一个数字k是理想的生成器,如果对于任意一个数字n(n≥k,都存在数组和为n的回文数组,且这个数组的和的长度刚好为k。原创 2025-07-17 17:04:59 · 923 阅读 · 0 评论 -
Codeforces Round 1017 (Div. 4) A-F
给你三个字符串,输出每个字符串的第一个字符。原创 2025-07-16 16:18:10 · 782 阅读 · 0 评论 -
Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2)
给你一个长度为n-1的字符串,每个字符为<或>,设索引从1开始若字符串中第i个字符出现<则i+1个元素来说要小于1~i之间的所有元素若字符串中第i个字符出现>则i+1个元素来说要大于1~i之间的所有元素求满足要求的排列是什么样子的。原创 2025-07-15 21:09:16 · 999 阅读 · 0 评论 -
Codeforces Round 1019 (Div. 2) A-D
给你一个长度为n的数组a,让你求a的最长子数组,假设长度为m,使得对于每个元素ai,都存在有另一个同样长度m的数组b,数组b的每个元素都不相同,其对应位置的bi有ai∗biaj∗bj1<=ijm。原创 2025-07-14 15:33:31 · 895 阅读 · 0 评论 -
Codeforces Round 1020 (Div. 3) A-E
给你一个长度为n的01串,每次能够翻转一位0变成1或者1变成0,从而创造一个新串,问在所有n个串中1的个数是多少。原创 2025-07-11 16:08:20 · 620 阅读 · 0 评论 -
Codeforces Round 1021 (Div. 2) A-C
给你一个十位数字的字符串,每一位数字i最小为10-i,你可以任意调换这个字符串内数字的位置,问最小的字符串是多少。原创 2025-07-10 16:21:15 · 951 阅读 · 0 评论 -
Educational Codeforces Round 178 (Rated for Div. 2) A-D
桌上有三副牌堆a,b,c(a<b<c)c移动一部分牌到a,b,问能否满足最后三副牌堆牌数为相等。原创 2025-07-09 18:04:01 · 546 阅读 · 0 评论 -
Codeforces Round 1035 (Div. 2) A-D
给你a,b,x,y给a+1的代价是x,a异或1的代价是y问a能否变成b,能的话最小代价是多少。原创 2025-07-09 16:00:32 · 685 阅读 · 0 评论 -
EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) A-D
给你一个长度为m的数组b设数组c为b非降序排列后的结果对于每一个i(1<=i<=m)如果bici则称数组b是乱序的给你一个长度为n的数组a,你可以从中删除任意多个元素,问能否实现a最后是乱序的。原创 2025-07-07 20:55:09 · 756 阅读 · 0 评论 -
Codeforces Round 1034 (Div. 3) A-F
给你一个0~n-1的数组,两个玩家alice和bob在一回合中alice可以随便选择一个数a并删掉bob只能选择一个数b满足(a+b)%4=3当一个玩家不能删掉数的时候这个玩家输掉游戏问在不同n的情况下,谁最后能赢得游戏。原创 2025-07-04 21:26:37 · 966 阅读 · 0 评论 -
Codeforces Round 1024 (Div. 2)
给你n,m,p,q让你构造一个长度为n的数组,数组总和为m,这个数组中任意一段长度为p子区间的和为q,问你是否能够构造出这样的数组。原创 2025-06-27 21:33:43 · 825 阅读 · 0 评论 -
Codeforces Round 1027 (Div. 3)
A. Square Year:给定四位数字字符串s,判断是否存在a,b使(a+b)²=s。解法是先检查s是否为完全平方数,再根据奇偶性拆分平方根。 B. Not Quite a Palindromic String:给定01串和k,判断能否通过重排使恰好k对字符对称。关键在于计算最大/最小可能对数,并检查k是否在范围内且满足奇偶条件。 C. Need More Arrays:求移除任意元素后,数组能被分成的最多连续子数组数量。贪心策略是尽可能多地分割,每次发现满足a原创 2025-06-26 23:56:53 · 948 阅读 · 0 评论 -
Educational Codeforces Round 180 (Rated for Div. 2) A-D
这篇文章摘要总结了四个编程竞赛题目及其解题思路: A.Race:分析Alice和Bob在随机终点情况下的最短路径问题。如果Alice位于终点之间,Bob无法更快;否则Bob可以选择更接近终点的位置获胜。 B.Shrinking Array:判断数组能否通过特定操作变得"美丽"。有三种情况:初始满足条件、单调数组无法满足、非单调数组可通过一次操作满足。 C.Coloring Game:计算Alice先手涂色获胜的可能方法数。通过分析Alice涂三个元素与Bob涂一个元素的情况,使用二分法确原创 2025-06-24 11:27:13 · 845 阅读 · 0 评论 -
Codeforces Round 1030 (Div. 2) A-D1
定义一个01串为完美如果其中的101子串个数和010子串个数相等,给你n,k,其中n为01串长度,k为1的个数,让你构造完美01川。原创 2025-06-23 19:05:36 · 644 阅读 · 0 评论 -
Codeforces Round 1033 (Div. 2) and CodeNite 2025 A-D
给你三个矩形,问是否能够拼成正方形。原创 2025-06-22 17:58:56 · 972 阅读 · 0 评论 -
Codeforces Round 1028 (Div. 2) A-C
Gellyfish有a点血,他的骑士有c点血Flower有b点血,他的其实有d点血Gellyfish先手,每次双方的骑士都可以攻击主人或者骑士,当主人血量为0时游戏结束问在最优策略下谁会获胜。原创 2025-06-21 21:14:19 · 942 阅读 · 0 评论 -
Codeforces Round 1032 (Div. 3) A-E
给你一个数组xn和初始位置pos,每次你可以进行以下操作的任意一个:从pos移动到pos+1从pos移动到pos-1当pos=xi时代表遍历到了xi元素问最少操作多少次可以遍历到所有的xn元素。原创 2025-06-20 17:44:56 · 1022 阅读 · 0 评论 -
Codeforces Round 1031 (Div. 2) A-D
有一个烤肉架初始温度为k,当温度>=a时可以花费x时间烹饪一个shashlik,当温度>=b时可以花费y时间烹饪一个shashlik问最多可以烹饪多少shashlik,其中k可以降到负数。原创 2025-06-16 22:20:55 · 769 阅读 · 0 评论 -
Codeforces Round 1029 (Div. 3)
求最左边关着的门和最右边关着的门,如果距离大于x则说明来不及。原创 2025-06-09 11:11:04 · 866 阅读 · 0 评论 -
Educational Codeforces Round 125 (Rated for Div. 2) D. For Gamers. By Gamers.
D. For Gamers. By Gamers.time limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMonocarp is playing a strategy game. In the game, he recruits a squad to fight monsters. Before each battle, Monocarp has C原创 2022-03-23 01:24:57 · 533 阅读 · 0 评论 -
Codeforces Round #705 (Div. 2) A. Anti-knapsack
A. Anti-knapsacktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two integers n and k. You are asked to choose maximum number of distinct integers from 1 to n so that there is no subset原创 2021-03-08 21:55:24 · 224 阅读 · 0 评论 -
Codeforces Educational Codeforces Round 105 B. Berland Crossword
B. Berland Crosswordtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland crossword is a puzzle that is solved on a square grid with n rows and n columns. Initially all the cells are white.To so原创 2021-03-03 01:56:30 · 506 阅读 · 5 评论 -
Codeforces Educational Codeforces Round 105 A. ABC String c++
A. ABC StringYou are given a string a, consisting of n characters, n is even. For each i from 1 to n ai is one of ‘A’, ‘B’ or ‘C’.A bracket sequence is a string containing only characters “(” and “)”. A regular bracket sequence is a bracket sequence that原创 2021-03-03 01:08:43 · 479 阅读 · 0 评论 -
codeforces C. Maximum width
C. Maximum widthtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYour classmate, whom you do not like because he is boring, but whom you respect for his intellect, has two strings: s of length n and原创 2021-02-24 12:35:24 · 282 阅读 · 1 评论 -
codeforces B. Card Deck
B. Card Decktime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou have a deck of n cards, and you’d like to reorder it to a new one.Each card has a value between 1 and n equal to pi. All pi are pairw原创 2021-02-24 11:27:36 · 454 阅读 · 0 评论 -
codeforces A. Three swimmers
A. Three swimmerstime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputThree swimmers decided to organize a party in the swimming pool! At noon, they started to swim from the left side of the pool.It tak原创 2021-02-24 10:40:35 · 180 阅读 · 0 评论 -
A. Dense Array
A. Dense ArrayT组测试样例,每组n个数据,问最少需要在当前这组数据中插入多少个数使得当前的这组数据满足相邻两个数据之间的最大值与最小值的比值小于等于2。输入样例644 2 10 121 326 131 4 251 2 3 4 3124 31 25 50 30 20 34 46 42 16 15 16输出样例512103解题思路在每次读入数据的时候进行分析首先如果最大值小于最小值的两倍,直接读入否则就判定一下谁大谁小,以决定我们加的数是变大原创 2021-02-18 20:24:24 · 573 阅读 · 0 评论 -
codeforces C. Minimum Ties (c++)
C. Minimum TiesA big football championship will occur soon! teams will compete in it, and each pair of teams will play exactly one game against each other.There are two possible outcomes of a game:the game may result in a tie, then both teams get poin原创 2021-02-18 19:47:34 · 227 阅读 · 0 评论 -
codeforces B. Cat Cycle c++
B. Cat CycleSuppose you are living with two cats: A and B. There are n napping spots where both cats usually sleep.Your cats like to sleep and also like all these spots, so they change napping spot each hour cyclically:Cat A changes its napping place in原创 2021-02-17 11:43:47 · 436 阅读 · 0 评论 -
codeforces A. Arena c++
A. Arenatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputn heroes fight against each other in the Arena. Initially, the i-th hero has level ai.Each minute, a fight between two different heroes occur原创 2021-02-16 18:04:00 · 622 阅读 · 1 评论