
acm训练集合
文章平均质量分 92
BoBoo文睡不醒
终将突破桎梏
展开
-
Igor and Mountain ( Codeforces Round 1013 (Div. 3) )
The visitors of the IT Campus “NEIMARK” are not only strong programmers but also physically robust individuals! Some practice swimming, some rowing, and some rock climbing!Master Igor is a prominent figure in the local rock climbing community. One day, h原创 2025-03-27 14:26:53 · 448 阅读 · 0 评论 -
Kitchen Robot ( 2010-2011 ACM-ICPC, NEERC, Northern Subregional Contest )
Robots are becoming more and more popular. They are used nowadays not only in manufacturing plants, but also at home. One programmer with his friends decided to create their own home robot. As you may know most programmers like to drink beer when they g原创 2025-03-24 13:51:46 · 1151 阅读 · 0 评论 -
Alien Communication Masterclass ( 2010-2011 ACM-ICPC, NEERC, Northern Subregional Contest )
Andrea is a famous science fiction writer, who runs masterclasses for her beloved readers. The most popular one is the Alien Communication Masterclass (ACM), where she teaches how to behave if you encounter alien life forms or at least alien artifacts.原创 2025-03-24 09:56:23 · 304 阅读 · 0 评论 -
Evacuation Plan( 2010-2011 ACM-ICPC Northeastern European Regional Contest (NEERC 10). )
Flatland government is building a new highway that will be used to transport weapons from its main weapon plant to the frontline in order to support the undergoing military operation against its neighbor country Edgeland. Highway is a straight line and t原创 2025-03-21 20:09:48 · 669 阅读 · 0 评论 -
Dome of Circus ( 2010-2011 ACM-ICPC Northeastern European Regional Contest (NEERC 10). )
A travelling circus faces a tough challenge in designing the dome for its performances. The circus has a number of shows that happen above the stage in the air under the dome. Various rigs, supports, and anchors must be installed over the stage, but und原创 2025-03-21 20:03:04 · 762 阅读 · 0 评论 -
Jump( 2015-2016 ACM-ICPC Northeastern European Regional Contest (NEERC 15). )
Consideratoy interactiveproblemOneMaxwhichisdefinedas follows. Youknowanintegernand there isahiddenbit stringSof lengthn. Theonlythingyoumaydo is topresent thesystemabit stringQof lengthn,andthesystemwill returnthenumberOneMax(Q)—thenumberofbitswhich c原创 2025-03-09 21:05:30 · 810 阅读 · 0 评论 -
Detect Shuing Method( Andrew Stankevich Contest 44 )
Detect Shuing Method( Andrew Stankevich Contest 44, XIII Open Cup Onsite Petrozavodsk Summer Training Camp, September 1, 2013 )原创 2025-03-09 17:23:20 · 1183 阅读 · 0 评论 -
Game with Binary String ( [Educational Codeforces Round 175 (Rated for Div. 2)])
Game with Binary String ( Educational Codeforces Round 175 (Rated for Div. 2) )Consider the following game. Two players have a binary string (a string consisting of characters 0 and/or 1). The players take turns, the first player makes the first turn. Dur原创 2025-03-04 20:37:27 · 1030 阅读 · 0 评论 -
Friends and Pizza (Educational Codeforces Round 175 (Rated for Div. 2))
Friends and Pizza (Educational Codeforces Round 175 (Rated for Div. 2))Monocarp has nn pizzas, the ii-th pizza consists of aia i slices. Pizzas are denoted by uppercase Latin letters from A to the nn-th letter of the Latin alphabet.Monocar原创 2025-03-04 20:36:14 · 810 阅读 · 0 评论 -
Tree Jumps ( [Educational Codeforces Round 175 (Rated for Div. 2)] )
Tree Jumps ( Educational Codeforces Round 175 (Rated for Div. 2) )You are given a rooted tree, consisting of nn vertices. The vertices in the tree are numbered from 11 to nn, and the root is the vertex 11. Let dxd x be the distance (the nu原创 2025-03-03 12:01:48 · 870 阅读 · 0 评论 -
Limited Repainting ( [Educational Codeforces Round 175 (Rated for Div. 2)])
Limited Repainting ( Educational Codeforces Round 175 (Rated for Div. 2) )You are given a strip, consisting of nn cells, all cells are initially colored red.In one operation, you can choose a segment of consecutive cells and paint them blue. Before pa原创 2025-03-03 09:36:39 · 825 阅读 · 0 评论 -
P4745 [CERC2017] Gambling Guide
P4745 [CERC2017] Gambling Guide一个铁路系统由 n 个城市和 m 条双向铁路组成。铁路票只能在安装在每个城市的自动售票机购买。不幸的是,黑客们已经篡改了这些售票机,现在它们有下面的规则:当 a 市的售票机有一个硬币投入时,机器会发一张从 a 市到随机一个邻市的单程票。原创 2025-03-03 09:01:08 · 719 阅读 · 0 评论 -
Discrete Logarithm is a Joke ( 2020-2021 Winter Petrozavodsk Camp)
Discrete Logarithm is a Joke ( 2020-2021 Winter Petrozavodsk Camp, Day 5: Almost Retired Dandelion Contest (XXI Open Cup, Grand Prix of Nizhny Novgorod). )Let’s take M=1018+31M=10 18 +31 which is a prime number, and g=42g=42 which is a primi原创 2025-02-24 10:36:40 · 963 阅读 · 0 评论 -
Film Critics ( [2020-2021 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2020)])
Film Critics ( 2020-2021 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2020) )The premier of the anticipated action film No Thyme to Fry is right around the corner, and it is time to give early screenings to film critics so that they can review it.原创 2025-02-24 10:07:43 · 660 阅读 · 0 评论 -
Beautiful Sequence ( [Educational Codeforces Round 174 (Rated for Div. 2)] )
Beautiful Sequence ( Educational Codeforces Round 174 (Rated for Div. 2) )Let’s call an integer sequence beautiful if the following conditions hold:its length is at least 33;for every element except the first one, there is an element to the left less原创 2025-02-19 10:43:55 · 636 阅读 · 0 评论 -
Palindrome Shuffle ( [Educational Codeforces Round 174 (Rated for Div. 2)] )
Palindrome Shuffle ( Educational Codeforces Round 174 (Rated for Div. 2) )You are given a string ss consisting of lowercase Latin letters.You can perform the following operation with the string ss: choose a contiguous substring (possibly empty) of原创 2025-02-19 10:42:59 · 469 阅读 · 0 评论 -
Remove Exactly Two ( [Codeforces Round 1000 (Div. 2)](httpsmirror.codeforces.comcontest2063) )
Remove Exactly Two ( Codeforces Round 1000 (Div. 2) )Recently, Little John got a tree from his aunt to decorate his house. But as it seems, just one tree is not enough to decorate the entire house. Little John has an idea. Maybe he can remove a few vertic原创 2025-02-17 19:23:41 · 945 阅读 · 0 评论 -
Game With Triangles ( [Codeforces Round 1000 (Div. 2)](httpsmirror.codeforces.comcontest2063) )
Game With Triangles ( Codeforces Round 1000 (Div. 2) )Even Little John needs money to buy a house. But he recently lost his job; how will he earn money now? Of course, by playing a game that gives him money as a reward! Oh well, maybe not those kinds of g原创 2025-02-17 19:23:02 · 564 阅读 · 0 评论 -
Modulo Permutations ( 2020-2021 ICPC Southeastern European Regional Programming Contest )
Modulo Permutations ( 2020-2021 ICPC Southeastern European Regional Programming Contest (SEERC 2020). )Given a natural number nn, count the number of permutations (p1,p2,…,pn)(p 1 ,p 2 ,…,p n ) of the numbers from 11 to nn,原创 2025-02-14 20:52:52 · 912 阅读 · 0 评论 -
Divine Gifting ( [2024-2025 ICPC Southwestern European Regional Contest (SWERC 2024)](gym105677). )
Divine Gifting ( 2024-2025 ICPC Southwestern European Regional Contest (SWERC 2024). )A celestial scroll, detailing Zeus’s latest whim unfurls before Hermes: the next few millenia will be a period of divine gifting for mortals. Hermes, the messenger god,原创 2025-02-14 20:44:32 · 1021 阅读 · 0 评论 -
Reverse Game ( [2020-2021 ICPC Southeastern European Regional Programming Contest (SEERC 2020)])
Reverse Game ( 2020-2021 ICPC Southeastern European Regional Programming Contest (SEERC 2020). )Alice and Bob are playing a turn-based game. The rules of the game are as follows:At the beginning of the game some binary string ss is chosen.On his turn原创 2025-02-13 20:59:56 · 1041 阅读 · 0 评论 -
Neo-Robin Hood( [2020-2021 ICPC Southeastern European Regional Programming Contest (SEERC 2020)] )
Neo-Robin Hood( 2020-2021 ICPC Southeastern European Regional Programming Contest (SEERC 2020) )There are nn aspiring politicians in Neverland. They are wealthy, but not wealthy enough to gain political influence. Since Neverland is a financially transp原创 2025-02-13 19:47:58 · 780 阅读 · 0 评论 -
Excavation ( [2020-2021 ICPC Central Europe Regional Contest (CERC 20)](gym104713) )
Excavation ( 2020-2021 ICPC Central Europe Regional Contest (CERC 20) )The police investigation revealed the gangsters deployed several radioactive stones under the city to poison underground waters. The exact positions of radioactive stones were found, b原创 2025-02-12 11:10:42 · 985 阅读 · 0 评论 -
Storage Problems ( [2020-2021 ICPC Central Europe Regional Contest (CERC 20)](gym104713) )
Storage Problems ( 2020-2021 ICPC Central Europe Regional Contest (CERC 20) )The gangsters did a very successful robbery of the city’s most famous auction house. Now they are safely at their hideout, where they store the stolen items. Luckily, you managed原创 2025-02-12 11:07:25 · 1093 阅读 · 0 评论 -
P4766 [CERC2014] Outer space invaders
P4766 [CERC2014] Outer space invaders题面翻译题目描述来自外太空的外星人(最终)入侵了地球。保卫自己,或者解体,被他们同化,或者成为食物。迄今为止,我们无法确定。原创 2025-02-10 20:41:55 · 552 阅读 · 0 评论 -
Human Resources ( 2023-2024 ICPC Central Europe Regional Contest (CERC 23) )
Human Resources ( 2023-2024 ICPC Central Europe Regional Contest (CERC 23) )You work at ECorp and your Human Resources department is migrating employee data from an on-premise system provided by Hooli to a new Cloud Native solution provided by a fresh sta原创 2025-02-10 20:41:00 · 403 阅读 · 0 评论 -
Hanoi ( 2022 ICPC Southeastern Europe Regional Contest )
Hanoi ( 2022 ICPC Southeastern Europe Regional Contest )The original problem “Towers of Hanoi” is about moving nn circular disks of distinct sizes between 33 rods. In one move, the player can move only the top disk from one rod to the top of another.原创 2025-02-09 21:44:19 · 1054 阅读 · 0 评论 -
Fortune over Sportsmanship ( 2022 ICPC Southeastern Europe Regional Contest )
Fortune over Sportsmanship ( 2022 ICPC Southeastern Europe Regional Contest )There is a tennis tournament happening right around the corner, with nn vicious participants.The marketing experts have devised an n×nn×n matrix PP, where Pi,jP i原创 2025-02-09 21:42:45 · 860 阅读 · 0 评论 -
Nusret Gökçe ( 2022 ICPC Southeastern Europe Regional Contest )
Nusret Gökçe ( 2022 ICPC Southeastern Europe Regional Contest )Nusret Gökçe is, by all means, one of the most valuable chefs to this date (at least, judging by the bills his customers have to pay). He is preparing his signature dish: the 24-karat gold ste原创 2025-02-09 21:41:45 · 1101 阅读 · 0 评论 -
Exercise ( 2022 ICPC Southeastern Europe Regional Contest )
Exercise ( 2022 ICPC Southeastern Europe Regional Contest )In a classroom, there are 2n2n students. The ii-th student has skill cic i . A teacher is holding an exercise that requires working in pairs. Initially, students 2i−12i−1 and 2i原创 2025-02-09 21:40:41 · 1271 阅读 · 0 评论 -
The Wall (medium) ( Helvetic Coding Contest 2016 online mirror (teams, unrated) )
The Wall (medium) ( Helvetic Coding Contest 2016 online mirror (teams, unrated) )Heidi the Cow is aghast: cracks in the northern Wall? Zombies gathering outside, forming groups, preparing their assault? This must not happen! Quickly, she fetches her HC2 (原创 2025-02-05 23:09:34 · 877 阅读 · 0 评论 -
The Wall (easy)( Helvetic Coding Contest 2016 online mirror (teams, unrated) )
The Wall (easy)( Helvetic Coding Contest 2016 online mirror (teams, unrated) )“When they come?”“I hope the Wall is high enough.”Zombie attacks have hit the Wall, our line of defense in the North. Its protection is failing, and cracks are showing. In p原创 2025-02-05 23:08:55 · 699 阅读 · 0 评论 -
An impassioned circulation of affection ( Codeforces Round 418 (Div. 2) )
An impassioned circulation of affection ( Codeforces Round 418 (Div. 2) )Nadeko’s birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped paper pieces was placed on a prominent part of the wall. Brother Koyomi w原创 2025-02-03 22:17:34 · 1156 阅读 · 0 评论 -
Tree Compass( Codeforces Round 934 (Div. 2) )
Tree Compass( Codeforces Round 934 (Div. 2) )You are given a tree with nn vertices numbered 1,2,…,n1,2,…,n. Initially, all vertices are colored white.You can perform the following two-step operation:Choose a vertex vv (1≤v≤n1≤v≤n) an原创 2025-02-03 21:07:53 · 929 阅读 · 0 评论 -
Nastya Is Transposing Matrices ( Codeforces Round 546 (Div. 2) )
Nastya Is Transposing Matrices ( Codeforces Round 546 (Div. 2) )Nastya came to her informatics lesson, and her teacher who is, by the way, a little bit famous here gave her the following task.Two matrices AA and BB are given, each of them has size原创 2025-02-02 22:18:01 · 1006 阅读 · 0 评论 -
Sum of Nestings ( [2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest, qualification stage )
Sum of Nestings ( [2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest, qualification stage )Recall that the bracket sequence is considered regular if it is possible to insert symbols ‘+’ and ‘1’ into it so that the result is a correct arithmetic expr原创 2025-02-02 22:07:06 · 692 阅读 · 0 评论 -
Not Escaping ( Codeforces Round 766 (Div. 2) )
Not Escaping ( Codeforces Round 766 (Div. 2) )Major Ram is being chased by his arch enemy Raghav. Ram must reach the top of the building to escape via helicopter. The building, however, is on fire. Ram must choose the optimal path to reach the top of the原创 2025-02-02 21:21:05 · 1417 阅读 · 0 评论 -
Two Divisors ( Educational Codeforces Round 89 (Rated for Div. 2) )
Two Divisors ( Educational Codeforces Round 89 (Rated for Div. 2) )You are given nn integers a1,a2,…,ana 1 ,a 2 ,…,a n .For each aia i find its two divisors d1>1d 1 >1 and d2>1d 2 >1 such that gcd(原创 2025-02-01 21:55:18 · 1260 阅读 · 0 评论 -
Palindrome Game (hard version)( Codeforces Round 721 (Div. 2) )
Palindrome Game (hard version)( Codeforces Round 721 (Div. 2) )The only difference between the easy and hard versions is that the given string ss in the easy version is initially a palindrome, this condition is not always true for the hard version.A p原创 2025-02-01 14:36:01 · 391 阅读 · 0 评论 -
Epidemic in Monstropolis( Codeforces Round 378 (Div. 2) )
Epidemic in Monstropolis( Codeforces Round 378 (Div. 2) )There was an epidemic in Monstropolis and all monsters became sick. To recover, all monsters lined up in queue for an appointment to the only doctor in the city.原创 2025-02-01 11:22:47 · 996 阅读 · 0 评论