![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforce周赛
文章平均质量分 77
Nebula_xuan
HUNAUer,希望在大学四年中在ACM这条路上越走越远~
展开
-
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 · 376 阅读 · 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 · 145 阅读 · 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 · 448 阅读 · 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 · 362 阅读 · 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 · 196 阅读 · 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 · 397 阅读 · 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 · 130 阅读 · 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 · 509 阅读 · 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 · 172 阅读 · 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 · 336 阅读 · 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 · 530 阅读 · 1 评论