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
7586 Fruits greedy implementation sortings Statement C Codeforces Beta Round 12 (Div 2 Only) {12} PROGRAMMING 1400
21255 Burglar and Matches greedy implementation sortings Statement B Codeforces Beta Round 16 (Div. 2 Only) {16} PROGRAMMING Codeforces Beta Round #16 Tutorial 1300
8340 Replacement greedy implementation sortings Statement A Codeforces Beta Round 97 (Div. 1) {135} PROGRAMMING Codeforces Beta Round #97: editorial 1400
47450 Business trip greedy implementation sortings Statement A Codeforces Round 106 (Div. 2) {149} PROGRAMMING Codeforces Round #106 (Div. 2) Tutorial 1100
1545 Geometry Horse greedy implementation sortings two pointers Statement C Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 1600
6992 Sockets greedy implementation sortings Statement A Codeforces Round 159 (Div. 2) {257} PROGRAMMING Codeforces Round #159 (Div. 2) Разбор Задач 1200
9916 Squares greedy implementation sortings Statement B Codeforces Round 161 (Div. 2) {263} PROGRAMMING Codeforces Round #161 Tutorial 1000
43147 Little Girl and Maximum Sum data structures greedy implementation sortings Statement C Codeforces Round 169 (Div. 2) {276} PROGRAMMING Codeforces Round #169 — Unofficial Editorial 1600
26710 Building Permutation greedy implementation sortings Statement C Codeforces Round 175 (Div. 2) {285} PROGRAMMING Codeforces Round #175 (Div. 2) Tutorial 1300
6010 Ilya and Matrix constructive algorithms greedy implementation sortings Statement C Codeforces Round 186 (Div. 2) {313} PROGRAMMING Tutorial 1400
289064 Helpful Maths greedy implementation sortings strings Statement A Codeforces Round 197 (Div. 2) {339} PROGRAMMING Codeforces Round #197 — Tutorial 900
6866 Bombs greedy implementation sortings Statement C Codeforces Round 203 (Div. 2) {350} PROGRAMMING Editorial Codeforces Round #203 (Div. 2) 1600
2449 Two Heaps combinatorics constructive algorithms greedy implementation math sortings Statement B Codeforces Round 205 (Div. 2) {353} PROGRAMMING 9145 1800
7442 Sereja and Stairs greedy implementation sortings Statement B Codeforces Round 223 (Div. 2) {381} PROGRAMMING Codeforces Round #223 — Tutorial 1100
3837 Multitasking greedy implementation sortings two pointers Statement B Codeforces Round 225 (Div. 2) {384} PROGRAMMING Codeforces Round #225 — Editorial 1500
131721 Gravity Flip greedy implementation sortings Statement A Codeforces Round 238 (Div. 2) {405} PROGRAMMING Codeforces Round #238 Tutorial 1000
8542 Megacity binary search greedy implementation sortings Statement B Codeforces Round 242 (Div. 2) {424} PROGRAMMING Codeforces Round #242 (Div. 2) Editorial 1200
71252 Choosing Teams greedy implementation sortings Statement A Codeforces Round 246 (Div. 2) {432} PROGRAMMING Codeforces Round #246 (Div. 2) Editorial 900
10579 The Child and Set bitmasks greedy implementation sortings Statement B Codeforces Round 250 (Div. 2) {437} PROGRAMMING 12513 1500
8543 Towers brute force constructive algorithms greedy implementation sortings Statement B Codeforces Round 274 (Div. 2) {479} PROGRAMMING Codeforces Round #274: editorial 1400
10706 SwapSort greedy implementation sortings Statement A Codeforces Round 277.5 (Div. 2) {489} PROGRAMMING Codeforces Round #277.5 (Div. 2) Editorial [A-D for now] 1300
73741 Team Olympiad greedy implementation sortings Statement A Codeforces Round 279 (Div. 2) {490} PROGRAMMING Codeforces Round #279 (Div. 2) Editorial 900
22427 Amr and Music greedy implementation sortings Statement A Codeforces Round 287 (Div. 2) {507} PROGRAMMING Editorial 1100
5141 Clique Problem data structures dp greedy implementation sortings Statement D Codeforces Round 296 (Div. 2) {527} PROGRAMMING Codeforces Round #296 Editorial 2100
30634 Queue greedy implementation sortings Statement D Codeforces Round 303 (Div. 2) {545} PROGRAMMING Codeforces Round #303 (Div.2) editorial 1400
18865 Soldier and Badges brute force greedy implementation sortings Statement B Codeforces Round 304 (Div. 2) {546} PROGRAMMING Codeforces Round #304 (Div.2) editorial 1300
9134 Order Book data structures greedy implementation sortings Statement B Codeforces Round 317 [AimFund Thanks-Round] (Div. 2) {572} PROGRAMMING Codeforces Round #317 [AimFund Thanks-Round] Editorial 1400
19713 Флеш-карты greedy implementation sortings Statement A Educational Codeforces Round 3 {609} PROGRAMMING Editorial 800
5063 Checkpoints greedy implementation sortings Statement B AIM Tech Round 3 (Div. 2) {709} PROGRAMMING 1500
2297 Ray Tracing greedy hashing implementation math number theory sortings Statement C Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) {724} PROGRAMMING Tutorial 1800
11178 USB vs. PS/2 greedy implementation sortings two pointers Statement B Educational Codeforces Round 17 {762} PROGRAMMING Tutorial 1400
11124 An abandoned sentiment from past constructive algorithms greedy implementation sortings Statement A Codeforces Round 418 (Div. 2) {814} PROGRAMMING Codeforces Round #418 (Div. 2) Editorial 1000
4985 Hacker, pack your bags! binary search greedy implementation sortings Statement C Codeforces Round 422 (Div. 2) {822} PROGRAMMING Codeforces Round #422 (Div. 2) Editorial 1600
11614 Nested Segments greedy implementation sortings Statement C Educational Codeforces Round 43 (Rated for Div. 2) {976} PROGRAMMING 59195 1500
5002 Petya's Exams greedy implementation sortings Statement G Codeforces Round 481 (Div. 3) {978} PROGRAMMING T 1800
6099 Knights of a Polygonal Table greedy implementation sortings Statement B Codeforces Round 488 by NEAR (Div. 2) {994} PROGRAMMING Codeforces Round #488 editorial 1400
14878 Polycarp's Practice greedy implementation sortings Statement B Codeforces Round 498 (Div. 3) {1006} PROGRAMMING 60672 1200
13399 Stages greedy implementation sortings Statement A Codeforces Round 499 (Div. 2) {1011} PROGRAMMING 60851 1000
27113 Heist greedy implementation sortings Statement A Codeforces Round 509 (Div. 2) {1041} PROGRAMMING Codeforces Round #509 (Div. 2) Editorial 800
2603 Pick Heroes greedy implementation interactive sortings Statement C Mail.Ru Cup 2018 Round 3 {1056} PROGRAMMING Mail.Ru Cup 2018 Round 3 Editorial 1700
7712 Views Matter greedy implementation sortings Statement B Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 1500
2610 TV Shows data structures greedy implementation sortings Statement D Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 2000
1122 New Year and the Acquaintance Estimation binary search data structures graphs greedy implementation math sortings Statement E Good Bye 2018 {1091} PROGRAMMING Editorial 2400
16394 Lunar New Year and Number Division greedy implementation math sortings Statement C Codeforces Round 536 (Div. 2) {1106} PROGRAMMING Tutorial 1000
18484 Parity Alternated Deletions greedy implementation sortings Statement B Codeforces Round 550 (Div. 3) {1144} PROGRAMMING 66307 1000
6614 Ugly Pairs dfs and similar greedy implementation sortings strings Statement B Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 1800
8602 The Party and Sweets binary search constructive algorithms greedy implementation math sortings two pointers Statement A Codeforces Round 559 (Div. 1) {1158} PROGRAMMING 66993 1500
2754 Candy Box (hard version) greedy implementation sortings Statement G Codeforces Round 570 (Div. 3) {1183} PROGRAMMING Tutorial 2100
19930 Shooting greedy implementation sortings Statement B Codeforces Round 587 (Div. 3) {1216} PROGRAMMING Codeforces Round #587 (Div. 3) Editorial 1000
4611 Balanced Removals (Harder) binary search constructive algorithms divide and conquer greedy implementation sortings Statement C2 Codeforces Global Round 5 {1237} PROGRAMMING T 1900
17425 Dominated Subarray greedy implementation sortings strings two pointers Statement C Educational Codeforces Round 76 (Rated for Div. 2) {1257} PROGRAMMING Educational Codeforces Round 76 Editorial 1200
3489 Portals data structures dp greedy implementation sortings Statement D Codeforces Round 608 (Div. 2) {1271} PROGRAMMING 72247 2100
127 Movie Fan *special data structures greedy implementation sortings Statement F Kotlin Heroes: Episode 3 {1297} PROGRAMMING Kotlin Heroes: Episode 3 Editorial
26450 Assigning to Classes greedy implementation sortings Statement B Codeforces Round 618 (Div. 2) {1300} PROGRAMMING 750.0 Codeforces Round #618 Editorial 1000
18088 Air Conditioner dp greedy implementation sortings two pointers Statement C Codeforces Round 620 (Div. 2) {1304} PROGRAMMING 1500.0 Codeforces Round #620 (Div. 2) Editorial 1500
1840 Drazil Likes Heap constructive algorithms data structures greedy implementation sortings Statement C Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov! {1329} PROGRAMMING 1500.0 Codeforces Round #631 Editorial 2400
4188 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
4663 Kate and imperfection greedy implementation math number theory sortings two pointers Statement F Codeforces Round 632 (Div. 2) {1333} PROGRAMMING 2500.0 Codeforces Round #632 (Div. 2) editorial
39987 Two Teams Composing binary search greedy implementation sortings Statement C Codeforces Round 634 (Div. 3) {1335} PROGRAMMING 75993 1100
3900 Johnny and Grandmaster greedy implementation math sortings Statement B Codeforces Round 647 (Div. 1) - Thanks, Algo Muse! {1361} PROGRAMMING 1250.0 Codeforces Round #647 Editorial 1900
8938 Task On The Board constructive algorithms greedy implementation sortings Statement D Codeforces Round 650 (Div. 3) {1367} PROGRAMMING Codeforces Round #650 (Div. 3) Editorial
2508 DeadLee constructive algorithms data structures graphs greedy implementation sortings Statement E Codeforces Round 652 (Div. 2) {1369} PROGRAMMING 2500.0 Codeforces Round #652 (Div. 2) Editorial 2400
11343 Odd-Even Subsequence binary search dp greedy implementation sortings Statement D Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 2000.0 Editorial — Codeforces Round #651
15176 Reading Books (easy version) data structures greedy implementation sortings Statement E1 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
1753 Mastermind constructive algorithms greedy implementation sortings Statement C Codeforces Round 658 (Div. 1) {1381} PROGRAMMING 2000.0 Codeforces Round #658 Editorial 2500
2646 Two Types of Spells binary search data structures greedy implementation math sortings Statement E Educational Codeforces Round 93 (Rated for Div. 2) {1398} PROGRAMMING Educational Codeforces Round 93 Editorial
24862 Maximum Product brute force dp greedy implementation sortings Statement B Codeforces Round 670 (Div. 2) {1406} PROGRAMMING 1000.0 Codeforces Round #670 (Div. 2) Editorial
17704 Sage's Birthday (hard version) binary search constructive algorithms greedy implementation sortings two pointers Statement D2 Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 1000.0 Codeforces Round #671 Editorial
26724 Sage's Birthday (easy version) binary search greedy implementation sortings Statement D1 Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 750.0 Codeforces Round #671 Editorial
11551 Chess Cheater greedy implementation sortings Statement B Codeforces Global Round 11 {1427} PROGRAMMING 750.0 Editorial of Global Round 11 1400
20429 Barrels greedy implementation sortings Statement B Educational Codeforces Round 96 (Rated for Div. 2) {1430} PROGRAMMING Educational Codeforces Round 96 — Editorial
37854 Replacing Elements greedy implementation sortings Statement A Educational Codeforces Round 102 (Rated for Div. 2) {1473} PROGRAMMING Educational Codeforces Round 102 Editorial
14468 Array Destruction constructive algorithms data structures greedy implementation sortings Statement C Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 1500.0 Codeforces Round #696 Editorial
5124 Robot Collisions data structures greedy implementation sortings Statement C Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
8383 Seating Arrangements (hard version) data structures greedy implementation sortings two pointers Statement D2 Codeforces Global Round 16 {1566} PROGRAMMING 1000.0 Codeforces Global Round 16 Editorial
1964 New School binary search data structures greedy implementation sortings Statement E Hello 2022 {1621} PROGRAMMING 2250.0
4505 Rescheduling the Exam binary search data structures greedy implementation math sortings Statement E Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
18822 Weight of the System of Nested Segments greedy hashing implementation sortings Statement C Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
19466 Maximum Cake Tastiness greedy implementation sortings Statement A Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) {1654} PROGRAMMING 500.0 Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) 800
16085 Prof. Slim greedy implementation sortings Statement A Codeforces Round 788 (Div. 2) {1670} PROGRAMMING 500.0 Tutorial 800
20755 Longest Strike data structures greedy implementation sortings two pointers Statement F Codeforces Round 790 (Div. 4) {1676} PROGRAMMING Codeforces Round #790 (Div. 4) Editorial
17864 Lex String brute force greedy implementation sortings two pointers Statement A Codeforces Round 798 (Div. 2) {1689} PROGRAMMING 500.0 Editorial for Codeforces Round #798 (Div. 2)
25562 Colored Balls: Revisited greedy implementation sortings Statement A Educational Codeforces Round 135 (Rated for Div. 2) {1728} PROGRAMMING 106805
63486 Increasing greedy implementation sortings Statement B Codeforces Round 827 (Div. 4) {1742} PROGRAMMING 107962
15900 Elemental Decompress constructive algorithms greedy implementation sortings Statement C Codeforces Round 842 (Div. 2) {1768} PROGRAMMING 1500.0 Codeforces Round #842 (Div. 2) Editorial
21189 Showstopper greedy implementation sortings Statement A Codeforces Round 860 (Div. 2) {1798} PROGRAMMING 500.0 Editorial of Codeforces Round 860 (Div. 2) 800
22878 Subsequence Addition (Easy Version) brute force dp greedy implementation sortings Statement G1 Codeforces Round 859 (Div. 4) {1807} PROGRAMMING 114143
30112 Subsequence Addition (Hard Version) dp greedy implementation math sortings Statement G2 Codeforces Round 859 (Div. 4) {1807} PROGRAMMING 114143
4363 The Butcher greedy implementation sortings two pointers Statement B Codeforces Round 866 (Div. 1) {1819} PROGRAMMING 1250.0 Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial
17588 Trust Nobody brute force greedy implementation sortings Statement A Codeforces Round 870 (Div. 2) {1826} PROGRAMMING 500.0 Codeforces Round #870 (Div. 2) Editorial 1200
5685 Survey in Class constructive algorithms data structures greedy implementation sortings Statement D Codeforces Round 879 (Div. 2) {1834} PROGRAMMING 1750.0 Codeforces Round #879 Editorial
21907 Rudolf and the Another Competition constructive algorithms greedy implementation sortings Statement C Codeforces Round 883 (Div. 3) {1846} PROGRAMMING
4336 Professor Higashikata brute force data structures dsu greedy implementation sortings Statement D Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 2000.0 Tutorial
26968 Vika and the Bridge binary search data structures greedy implementation math sortings Statement B Codeforces Round 885 (Div. 2) {1848} PROGRAMMING 1000.0 Codeforces Round #885 (Div.2) Editorial
66814 Balanced Round brute force greedy implementation sortings Statement D Codeforces Round 886 (Div. 4) {1850} PROGRAMMING Codeforces Round #886 (Div. 4) Editorial
18688 Queue Sort greedy implementation sortings Statement E Codeforces Round 909 (Div. 3) {1899} PROGRAMMING Разбор Codeforces Round 909 (Div. 3)
5891 Set To Max (Hard Version) binary search constructive algorithms data structures dsu greedy implementation sortings two pointers Statement D2 Codeforces Round 914 (Div. 2) {1904} PROGRAMMING 750.0 Codeforces Round 914 (Div. 2) Editorial
10704 Bicycles dp graphs greedy implementation shortest paths sortings Statement G Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
27655 Minimize Inversions constructive algorithms data structures greedy implementation sortings Statement B Codeforces Round 922 (Div. 2) {1918} PROGRAMMING 1000.0 Codeforces Round #922 (Div. 2) Editorial
4662 01 Tree data structures divide and conquer greedy implementation sortings trees Statement D Hello 2024 {1919} PROGRAMMING 1500.0 2100
10859 Long Inversions brute force greedy implementation sortings Statement E Codeforces Round 938 (Div. 3) {1955} PROGRAMMING 128243
15346 Permutation Counting binary search greedy implementation math sortings Statement A Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 750.0 Tutorial 1400
31214 Binary Cut dp greedy implementation sortings strings Statement D Codeforces Round 944 (Div. 4) {1971} PROGRAMMING Codeforces Round 944 (Div. 4) Editorial 1100
10041 Cat, Fox and Double Maximum constructive algorithms greedy implementation math sortings Statement C Codeforces Round 945 (Div. 2) {1973} PROGRAMMING 1500.0 Editorial for Codeforces Round #945 (Div. 2) 1700
20972 Bazoka and Mocha's Array brute force greedy implementation sortings Statement A Codeforces Round 947 (Div. 1 + Div. 2) {1975} PROGRAMMING 250.0 editorial_zh.pdf 800
27716 Soccer greedy implementation math sortings Statement A Codeforces Round 955 (Div. 2, with prizes from NEAR!) {1982} PROGRAMMING 500.0 130839
6855 Darius' Wisdom constructive algorithms greedy implementation sortings Statement D Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 1500.0 Rayan 2024 Selection Round Editorial
7865 Refined Product Optimality binary search data structures greedy implementation math schedules sortings Statement D Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 1750.0 Good Bye 2024: 2025 is NEAR Editorial
6557 Dining Hall greedy implementation sortings sortings Statement C Codeforces Round 1012 (Div. 2) {2090} PROGRAMMING 1750.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
28911 Kamilka and the Sheep greedy implementation math sortings Statement A Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 500.0 Codeforces Round #1014 (Div. 2) Editorial
2112 Wonderful Teddy Bears greedy implementation sortings Statement E Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) {2096} PROGRAMMING 2000.0 Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) Editorial
5554 Changing the String binary search data structures greedy implementation sortings strings Statement E Educational Codeforces Round 179 (Rated for Div. 2) {2111} PROGRAMMING Educational Codeforces Round 179 Editorial
7004 Gravity Falls greedy implementation sortings Statement F Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
5532 Adjusting Drones binary search data structures dsu greedy implementation sortings Statement E Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 2000.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
18969 Dungeon Equilibrium greedy implementation sortings Statement A Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 500.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
37652 Isamatdin and His Magic Wand! constructive algorithms greedy implementation sortings Statement C Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
6009 New Year's Gifts data structures greedy implementation sortings two pointers Statement E Educational Codeforces Round 186 (Rated for Div. 2) {2182} PROGRAMMING Educational Codeforces Round 186 Editorial
3363 Mooclear Reactor 2 data structures greedy implementation sortings Statement F Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
15334 Cyclists games greedy implementation sortings Statement B Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1000.0 Tutorial
1553 Minimum Influence binary search data structures geometry greedy implementation math sortings two pointers Statement E Educational Codeforces Round 190 (Rated for Div. 2) {2230} PROGRAMMING Educational Codeforces Round 190 — Editorial
2008 Busy Beaver brute force divide and conquer dp greedy implementation sortings Statement E Codeforces Round 1117 (Div. 2) {2257} PROGRAMMING 2250.0 Codeforces Round 1117 (Div. 2) Editorial