Codeforces problemset search & solutions
Exclude tags.

Review the problem statement from Codeforces (link will open a new tab). When you've matched your problem, go to the solutions.

Search on plain tags, ratings, names, and problem text. Example: brute force or binary search

Solved
Name
Tags
Solutions
Index
Contest
Type
Points
Tutorial
Rating Level
5873 Tournament bitmasks brute force dfs and similar greedy Statement B Codeforces Beta Round 27 (Codeforces format, Div. 2) {27} PROGRAMMING Codeforces Beta #27 - Tutorial 2000
1730 Train dp games greedy Statement B Codeforces Beta Round 68 {74} PROGRAMMING Solutions for Codeforces Beta Round #68 1600
1447 Zero-One constructive algorithms games greedy Statement C Codeforces Beta Round 97 (Div. 1) {135} PROGRAMMING Codeforces Beta Round #97: editorial 2000
7746 Playing Cubes games greedy implementation Statement B Codeforces Round 159 (Div. 2) {257} PROGRAMMING Codeforces Round #159 (Div. 2) Разбор Задач 1400
32021 Little Girl and Game games greedy Statement B Codeforces Round 169 (Div. 2) {276} PROGRAMMING Codeforces Round #169 — Unofficial Editorial 1400
1590 Beautiful Decomposition dp games greedy number theory Statement E Codeforces Round 171 (Div. 2) {279} PROGRAMMING Codeforces Round #171 (Div. 2) Разбор Задач 2100
3187 Weird Game games greedy Statement A Croc Champ 2013 - Round 2 {293} PROGRAMMING Croc Champ 2013 — Round 2 — Editorial 1500
3805 Fox and Card Game games greedy sortings Statement C Codeforces Round 228 (Div. 1) {388} PROGRAMMING Codeforces Round #228 — Editorial 2000
12251 Football Kit brute force greedy implementation Statement B Codeforces Round 246 (Div. 2) {432} PROGRAMMING Codeforces Round #246 (Div. 2) Editorial 1200
126 An easy problem about trees dp games greedy trees Statement F MemSQL Start[c]UP 2.0 - Round 2 {457} PROGRAMMING MemSQL Start[c]UP 2.0 Round 1 and 2 Editorials 3000
1667 Cubes games greedy implementation Statement D Codeforces Round 295 (Div. 2) {520} PROGRAMMING Codeforces Round #295 Editorial (now with bonuses!) 2400
2434 Board Game games greedy implementation math Statement C VK Cup 2015 - Round 2 (unofficial online mirror, Div. 1 only) {533} PROGRAMMING Разбор VK Cup Round 2 1700
16850 Simple Game constructive algorithms games greedy implementation math Statement B Codeforces Round 316 (Div. 2) {570} PROGRAMMING Codeforces Round #316 Editorial 1300
13137 Dinner with Emma games greedy Statement B Educational Codeforces Round 5 {616} PROGRAMMING Editorial of Educational Codeforces Round 5 1100
719 Family Photos games greedy Statement F Canada Cup 2016 {725} PROGRAMMING Canada Cup Editorial 2900
12865 PolandBall and Game binary search data structures games greedy sortings strings Statement B 8VC Venture Cup 2017 - Elimination Round {755} PROGRAMMING 8VC Venture Cup 2017 — Elimination Round [Editorial] 1200
3323 Naming Company games greedy sortings Statement C Tinkoff Challenge - Final Round (Codeforces Round 414, rated, Div. 1 + Div. 2) {794} PROGRAMMING 1800
519 Mister B and Boring Game games greedy Statement A Codeforces Round 421 (Div. 1) {819} PROGRAMMING Codeforces Round #421 Editorial 2100
527 Mister B and Boring Game games greedy Statement C Codeforces Round 421 (Div. 2) {820} PROGRAMMING 1500.0 Codeforces Round #421 Editorial 2200
122 To Play or not to Play greedy Statement F Russian Code Cup 2017 - Finals [Unofficial Mirror, Div. 1 Only Recommended, Teams Allowed] {856} PROGRAMMING Tutorial 3100
2294 Ithea Plays With Chtholly binary search constructive algorithms games greedy interactive Statement B Codeforces Round 449 (Div. 1) {896} PROGRAMMING Codeforces Round #449 Editorial 2000
9027 Conan and Agasa play a Card Game games greedy implementation Statement B Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined) {914} PROGRAMMING Tutorial 1300
3940 Posterized games greedy Statement C Codeforces Round 480 (Div. 2) {980} PROGRAMMING Tutorial 1700
2113 The Number Games data structures greedy trees Statement E Codeforces Round 480 (Div. 2) {980} PROGRAMMING Tutorial 2300
12514 Game with Telephone Numbers games greedy implementation Statement B Educational Codeforces Round 63 (Rated for Div. 2) {1155} PROGRAMMING 66687 1200
2215 Tokitsukaze and Duel brute force games greedy Statement C Codeforces Round 573 (Div. 1) {1190} PROGRAMMING E 2400
6555 Ticket Game games greedy math Statement D Codeforces Round 585 (Div. 2) {1215} PROGRAMMING Codeforces Round #585 Editorial 1700
10801 Substring Game in the Lesson games greedy strings Statement C Codeforces Round 586 (Div. 1 + Div. 2) {1220} PROGRAMMING Codeforces Round #586 Editorial 1300
17804 Card Game games greedy math Statement A Good Bye 2019 {1270} PROGRAMMING Разбор Goodbye 2019 700
4128 Challenges in school №41 brute force constructive algorithms games graphs greedy implementation sortings Statement D Codeforces Round 632 (Div. 2) {1333} PROGRAMMING 1750.0 Codeforces Round #632 (Div. 2) editorial
25026 Matrix Game games greedy implementation Statement A Codeforces Round 648 (Div. 2) {1365} PROGRAMMING 500.0 Editorial — Codeforces Round #648 1100
1104 Lamps on a Circle games greedy implementation interactive math Statement F Codeforces Global Round 8 {1368} PROGRAMMING 3000.0 Codeforces Global Round 8: editorial
5714 Omkar and Circle brute force constructive algorithms dp games greedy Statement D Codeforces Round 655 (Div. 2) {1372} PROGRAMMING 2000.0 Codeforces Round #655 Editorial 2100
5431 GameGame bitmasks constructive algorithms dp games greedy math Statement B Codeforces Round 659 (Div. 1) {1383} PROGRAMMING 1000.0 Codeforces Round #659 Editorial
12891 Stoned Game brute force constructive algorithms games greedy Statement B Codeforces Round 666 (Div. 1) {1396} PROGRAMMING 1000.0 Codeforces Round #666 — Editorial
25854 Substring Removal Game games greedy sortings strings Statement B Educational Codeforces Round 93 (Rated for Div. 2) {1398} PROGRAMMING Educational Codeforces Round 93 Editorial
7209 Arena of Greed games greedy Statement A 2020 ICPC, COMPFEST 12, Indonesia Multi-Provincial Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1425} PROGRAMMING Tutorial 1400
203 Number Deletion Game *special dp games greedy Statement G Kotlin Heroes 5: ICPC Round {1431} PROGRAMMING 84563
30452 Even-Odd Game dp games greedy sortings Statement D Codeforces Round 693 (Div. 3) {1472} PROGRAMMING Codeforces Round #693 (Div. 3) Editorial
27123 Yet Another String Game games greedy strings Statement A Codeforces Round 700 (Div. 2) {1480} PROGRAMMING 500.0 Editorial of Codeforces Round #700
20950 Accidental Victory binary search data structures greedy Statement E Codeforces Round 702 (Div. 3) {1490} PROGRAMMING Codeforces Round #702 (Div. 3) Editorial
6327 Let's Go Hiking constructive algorithms games greedy implementation Statement B Codeforces Round 706 (Div. 1) {1495} PROGRAMMING 1000.0 Codeforces Round #706 Editorial
1465 Game with Stones binary search data structures games greedy Statement E Technocup 2022 - Elimination Round 2 {1584} PROGRAMMING 2000.0 Editorial for Technocup 2022 — Elimination Round 2 and Codeforces Round #755 (Div. 1, Div. 2) 2300
2358 Array Game games greedy two pointers Statement E Bubble Cup 14 - Finals Online Mirror (Unrated, ICPC Rules, Teams Preferred, Div. 2) {1600} PROGRAMMING BubbleCup2021.pdf
3243 Treelabeling bitmasks constructive algorithms dfs and similar games graphs greedy trees Statement D Codeforces Round 754 (Div. 2) {1605} PROGRAMMING 2000.0 tutorial 2100
1696 Purple Crayon dp games greedy math trees Statement E Codeforces Global Round 18 {1615} PROGRAMMING 2750.0 Global Round 18 Editorial
17537 Not Sitting games greedy sortings Statement B Codeforces Round 766 (Div. 2) {1627} PROGRAMMING 1250.0 Codeforces Round #766 (Div. 2) Editorial
19132 Subtle Substring Subtraction games greedy strings Statement A Codeforces Round 785 (Div. 2) {1673} PROGRAMMING 500.0 Codeforces Round #785 (Div. 2) Editorial
21676 Game with Cards games greedy Statement A Educational Codeforces Round 129 (Rated for Div. 2) {1681} PROGRAMMING 103163 800
12741 Even Number Addicts dp games greedy math Statement C Codeforces Global Round 22 {1738} PROGRAMMING 1500.0 Editorial of Codeforces Global Round <strong>22</strong>
12302 Bricks and Bags constructive algorithms games greedy sortings Statement C Codeforces Round 831 (Div. 1 + Div. 2) {1740} PROGRAMMING 1500.0 Tutorial 1400
15682 Number Game games greedy implementation Statement C Educational Codeforces Round 138 (Rated for Div. 2) {1749} PROGRAMMING 108269
892 Spinach Pizza games geometry greedy interactive Statement I SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1776} PROGRAMMING
981 Library game games greedy interactive sortings Statement C SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1776} PROGRAMMING
4715 Tenzing and His Animal Friends brute force constructive algorithms graphs greedy shortest paths Statement D CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) {1842} PROGRAMMING 1500.0 CodeTON Round 5 Editorial
65597 Buttons games greedy math Statement A Codeforces Round 893 (Div. 2) {1858} PROGRAMMING 500.0 Codeforces Round #893 (Div. 2) Editorial 800
15526 Game on Permutation data structures games greedy Statement C Educational Codeforces Round 153 (Rated for Div. 2) {1860} PROGRAMMING Educational Codeforces Round 153 Editorial
12654 Salyg1n and the MEX Game constructive algorithms data structures games greedy interactive Statement C Codeforces Round 897 (Div. 2) {1867} PROGRAMMING 1250.0
1854 Infinite Card Game brute force dfs and similar games graphs greedy sortings Statement E Educational Codeforces Round 157 (Rated for Div. 2) {1895} PROGRAMMING Educational Codeforces Round 157 Editorial
2503 Geo Game constructive algorithms dp games greedy interactive math Statement E Codeforces Round 912 (Div. 2) {1903} PROGRAMMING 2250.0 Codeforces Round #912 (Div. 2) Editorial
14204 Game with Marbles (Easy Version) brute force games greedy sortings Statement E1 Codeforces Round 916 (Div. 3) {1914} PROGRAMMING Codeforces Round 916 (Div. 3) Editorial
14707 Game with Marbles (Hard Version) games greedy sortings Statement E2 Codeforces Round 916 (Div. 3) {1914} PROGRAMMING Codeforces Round 916 (Div. 3) Editorial
23083 Summation Game dp games greedy sortings Statement B Codeforces Round 919 (Div. 2) {1920} PROGRAMMING 1000.0 Editorial for Codeforces Round #919 (Div. 2)
11378 Eat the Chip brute force games greedy Statement E Codeforces Round 920 (Div. 3) {1921} PROGRAMMING Editorial for Codeforces Round 920 (Div. 3)
17241 Sasha and the Casino binary search brute force dp games greedy math Statement C Codeforces Round 926 (Div. 2) {1929} PROGRAMMING 1500.0 Codeforces Round #926 (Div. 2) Editorial.
25527 Anna and the Valentine's Day Gift games greedy math sortings Statement E Codeforces Round 925 (Div. 3) {1931} PROGRAMMING 125878
1748 XOR Break --- Game Version bitmasks games greedy interactive Statement D2 Codeforces Round 931 (Div. 2) {1934} PROGRAMMING 1250.0 Tutorial
21422 MEX Game 1 brute force games greedy Statement A Codeforces Round 934 (Div. 1) {1943} PROGRAMMING 500.0 Codeforces Round #934 (Div1, Div2) Editorial
357 Thanos Snap dp games greedy trees Statement H Codeforces Global Round 25 {1951} PROGRAMMING 3500.0 Codeforces Global Round 25 Editorial
8686 Unfair Game dp games greedy math Statement F Codeforces Round 938 (Div. 3) {1955} PROGRAMMING 128243
22892 Nene and the Card Game games greedy Statement B Codeforces Round 939 (Div. 2) {1956} PROGRAMMING 750.0 [Editorial] Codeforces Round 939 (Div. 2)
16651 Everything Nim games greedy math sortings Statement A Codeforces Round 941 (Div. 1) {1965} PROGRAMMING 500.0 Codeforces Round #941 (Div. 1, Div. 2) Editorial 1400
19544 Card Exchange constructive algorithms games greedy Statement A Codeforces Round 941 (Div. 2) {1966} PROGRAMMING 500.0 Codeforces Round #941 (Div. 1, Div. 2) Editorial 800
17364 Permutation Game brute force dfs and similar games graphs greedy math Statement D Codeforces Round 943 (Div. 3) {1968} PROGRAMMING 129096 1300
8674 World is Mine dp games greedy Statement D EPIC Institute of Technology Round Summer 2024 (Div. 1 + Div. 2) {1987} PROGRAMMING 1500.0 EPIC Institute of Technology Round Summer 2024 (Div. 1 + Div. 2) Editorial
26792 Submission Bait brute force games greedy sortings Statement A Codeforces Round 960 (Div. 2) {1990} PROGRAMMING 500.0 Video Tutorial
5101 Coloring Game constructive algorithms games graphs greedy interactive Statement E Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 2000.0 Video Tutorial
171 Grid Game constructive algorithms games greedy interactive Statement I Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 4000.0 Video Tutorial
27477 Turtle and Piggy Are Playing a Game 2 games greedy sortings Statement B Codeforces Round 968 (Div. 2) {2003} PROGRAMMING 750.0 sol-zh.pdf
26937 Splitting Items games greedy sortings Statement C Educational Codeforces Round 169 (Rated for Div. 2) {2004} PROGRAMMING Educational Codeforces Round 169 Editorial
3314 Subtangle Game (Easy Version) dp games greedy implementation Statement E1 Codeforces Round 972 (Div. 2) {2005} PROGRAMMING 1500.0 Discussion stream (With Hints)
1056 Subtangle Game (Hard Version) dp games greedy implementation Statement E2 Codeforces Round 972 (Div. 2) {2005} PROGRAMMING 2000.0 Discussion stream (With Hints)
9292 Iris and Game on the Tree games graphs greedy trees Statement A Codeforces Round 969 (Div. 1) {2006} PROGRAMMING 750.0 Tutorial
5607 Robin Hood Archery data structures games greedy hashing Statement H Codeforces Round 974 (Div. 3) {2014} PROGRAMMING Discussion stream (With Hints)
325 Speedbreaker Counting (Easy Version) combinatorics dp games greedy implementation math Statement F1 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 1500.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
11692 Replacement games greedy strings Statement B Refact.ai Match 1 (Codeforces Round 985) {2029} PROGRAMMING 1250.0 Refact.ai Match 1 (Codeforces Round 985) Editorial
19765 A TRUE Battle brute force games greedy Statement C Codeforces Round 979 (Div. 2) {2030} PROGRAMMING 1000.0 Codeforces Round 979 Editorial
5406 Bonus Project games greedy Statement A 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 1400
19441 Game with Colored Marbles games greedy Statement B Educational Codeforces Round 172 (Rated for Div. 2) {2042} PROGRAMMING 136886
33516 Two Frogs constructive algorithms games greedy Statement A Codeforces Round 996 (Div. 2) {2055} PROGRAMMING 500.0 Codeforces Round 996 (Div. 2) Editorial
31980 Game of Mathletes games greedy sortings two pointers Statement C Codeforces Round 998 (Div. 3) {2060} PROGRAMMING Codeforces Round 998 (Div. 3) Editorial
1834 Game with Binary String data structures divide and conquer games greedy math Statement E Educational Codeforces Round 175 (Rated for Div. 2) {2070} PROGRAMMING Video Tutorial
725 Wish Upon a Satellite (Easy Version) dp games greedy Statement G1 Teza Round 1 (Codeforces Round 1015, Div. 1 + Div. 2) {2084} PROGRAMMING 2500.0 141155
17271 Card Game brute force games greedy math Statement C Educational Codeforces Round 178 (Rated for Div. 2) {2104} PROGRAMMING Educational Codeforces Round 178 Editorial
19652 Apples in Boxes games greedy math Statement B Codeforces Round 1023 (Div. 2) {2107} PROGRAMMING 750.0 Codeforces Round 1023 (Div 2) Editorial
21739 Binary String Battle constructive algorithms games greedy Statement D Codeforces Round 1034 (Div. 3) {2123} PROGRAMMING Codeforces Round 1034 (Div. 3) Editorial
13444 Hamiiid, Haaamid... Hamid? games greedy Statement B Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 1000.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
12309 Trip Shopping games greedy sortings Statement C Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 1500.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
12292 Ultimate Value data structures games greedy Statement C Codeforces Round 1049 (Div. 2) {2140} PROGRAMMING 1250.0 Codeforces Round 1049 (Div. 2) Editorial
7430 Game on Array games greedy Statement D Codeforces Global Round 29 (Div. 1 + Div. 2) {2147} PROGRAMMING 2000.0
2807 Mimo & Yuyu games greedy math Statement E Codeforces Round 1056 (Div. 2) {2155} PROGRAMMING 2250.0 Codeforces Round 1056 (Div. 2) Editorial
951 Best Time to Buy and Sell Stock binary search data structures games greedy Statement E Codeforces Round 1061 (Div. 2) {2156} PROGRAMMING 2750.0 Codeforces Round 1061 (Div. 2) Editorial
10919 Annoying Game dp games greedy Statement C Codeforces Round 1067 (Div. 2) {2158} PROGRAMMING 1500.0 Codeforces Round 1067 (Div. 2) Editorial
15653 Round Trip games greedy implementation math Statement A Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 500.0
11720 Renako Amaori and XOR Game (hard version) bitmasks games greedy Statement C2 Codeforces Round 1065 (Div. 3) {2171} PROGRAMMING Codeforces Round 1065 (Div. 3) Editorial
19074 Renako Amaori and XOR Game (easy version) games greedy Statement C1 Codeforces Round 1065 (Div. 3) {2171} PROGRAMMING Codeforces Round 1065 (Div. 3) Editorial
5554 Battle of Arrays brute force data structures games greedy Statement B 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
1332 Jerry and Tom data structures dfs and similar games graphs greedy trees Statement C Codeforces Round 1077 (Div. 1) {2187} PROGRAMMING 1750.0 Codeforces Round 1077 (Div. 1, Div. 2) Editorial
16899 Sorting Game games greedy Statement A Codeforces Round 1073 (Div. 1) {2190} PROGRAMMING 500.0 Codeforces Round 1073 (Div. 1, Div. 2) Editorial
7686 Divisive Battle games greedy math number theory Statement E Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
5237 Divisibility Game brute force games greedy number theory Statement D Educational Codeforces Round 187 (Rated for Div. 2) {2203} PROGRAMMING Educational Codeforces Round 187 Editorial
5550 One Night At Freddy's games greedy sortings Statement B Codeforces Round 1085 (Div. 1 + Div. 2) {2207} PROGRAMMING 1250.0 Codeforces Round 1085 (Div. 1 + Div. 2) Editorial
13216 Cyclists games greedy implementation sortings Statement B Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1000.0 Tutorial
589 Interval Game bitmasks combinatorics dp games greedy math probabilities Statement F Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 2750.0