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
7511 Fruits greedy implementation sortings Statement C Codeforces Beta Round 12 (Div 2 Only) {12} PROGRAMMING 1400
21100 Burglar and Matches greedy implementation sortings Statement B Codeforces Beta Round 16 (Div. 2 Only) {16} PROGRAMMING Codeforces Beta Round #16 Tutorial 1300
8318 Replacement greedy implementation sortings Statement A Codeforces Beta Round 97 (Div. 1) {135} PROGRAMMING Codeforces Beta Round #97: editorial 1400
46928 Business trip greedy implementation sortings Statement A Codeforces Round 106 (Div. 2) {149} PROGRAMMING Codeforces Round #106 (Div. 2) Tutorial 1100
1534 Geometry Horse greedy implementation sortings two pointers Statement C Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 1600
6970 Sockets greedy implementation sortings Statement A Codeforces Round 159 (Div. 2) {257} PROGRAMMING Codeforces Round #159 (Div. 2) Разбор Задач 1200
9871 Squares greedy implementation sortings Statement B Codeforces Round 161 (Div. 2) {263} PROGRAMMING Codeforces Round #161 Tutorial 1000
41868 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
26581 Building Permutation greedy implementation sortings Statement C Codeforces Round 175 (Div. 2) {285} PROGRAMMING Codeforces Round #175 (Div. 2) Tutorial 1300
5990 Ilya and Matrix constructive algorithms greedy implementation sortings Statement C Codeforces Round 186 (Div. 2) {313} PROGRAMMING Tutorial 1400
283783 Helpful Maths greedy implementation sortings strings Statement A Codeforces Round 197 (Div. 2) {339} PROGRAMMING Codeforces Round #197 — Tutorial 900
6855 Bombs greedy implementation sortings Statement C Codeforces Round 203 (Div. 2) {350} PROGRAMMING Editorial Codeforces Round #203 (Div. 2) 1600
2445 Two Heaps combinatorics constructive algorithms greedy implementation math sortings Statement B Codeforces Round 205 (Div. 2) {353} PROGRAMMING 9145 1800
7404 Sereja and Stairs greedy implementation sortings Statement B Codeforces Round 223 (Div. 2) {381} PROGRAMMING Codeforces Round #223 — Tutorial 1100
3826 Multitasking greedy implementation sortings two pointers Statement B Codeforces Round 225 (Div. 2) {384} PROGRAMMING Codeforces Round #225 — Editorial 1500
129733 Gravity Flip greedy implementation sortings Statement A Codeforces Round 238 (Div. 2) {405} PROGRAMMING Codeforces Round #238 Tutorial 1000
8509 Megacity binary search greedy implementation sortings Statement B Codeforces Round 242 (Div. 2) {424} PROGRAMMING Codeforces Round #242 (Div. 2) Editorial 1200
70625 Choosing Teams greedy implementation sortings Statement A Codeforces Round 246 (Div. 2) {432} PROGRAMMING Codeforces Round #246 (Div. 2) Editorial 900
10539 The Child and Set bitmasks greedy implementation sortings Statement B Codeforces Round 250 (Div. 2) {437} PROGRAMMING 12513 1500
8494 Towers brute force constructive algorithms greedy implementation sortings Statement B Codeforces Round 274 (Div. 2) {479} PROGRAMMING Codeforces Round #274: editorial 1400
10657 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
72955 Team Olympiad greedy implementation sortings Statement A Codeforces Round 279 (Div. 2) {490} PROGRAMMING Codeforces Round #279 (Div. 2) Editorial 900
22211 Amr and Music greedy implementation sortings Statement A Codeforces Round 287 (Div. 2) {507} PROGRAMMING Editorial 1100
5106 Clique Problem data structures dp greedy implementation sortings Statement D Codeforces Round 296 (Div. 2) {527} PROGRAMMING Codeforces Round #296 Editorial 2100
30210 Queue greedy implementation sortings Statement D Codeforces Round 303 (Div. 2) {545} PROGRAMMING Codeforces Round #303 (Div.2) editorial 1400
18800 Soldier and Badges brute force greedy implementation sortings Statement B Codeforces Round 304 (Div. 2) {546} PROGRAMMING Codeforces Round #304 (Div.2) editorial 1300
9091 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
19631 Флеш-карты greedy implementation sortings Statement A Educational Codeforces Round 3 {609} PROGRAMMING Editorial 800
5055 Checkpoints greedy implementation sortings Statement B AIM Tech Round 3 (Div. 2) {709} PROGRAMMING 1500
2290 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
10999 USB vs. PS/2 greedy implementation sortings two pointers Statement B Educational Codeforces Round 17 {762} PROGRAMMING Tutorial 1400
11093 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
4960 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
11303 Nested Segments greedy implementation sortings Statement C Educational Codeforces Round 43 (Rated for Div. 2) {976} PROGRAMMING 59195 1500
4970 Petya's Exams greedy implementation sortings Statement G Codeforces Round 481 (Div. 3) {978} PROGRAMMING T 1800
6082 Knights of a Polygonal Table greedy implementation sortings Statement B Codeforces Round 488 by NEAR (Div. 2) {994} PROGRAMMING Codeforces Round #488 editorial 1400
14802 Polycarp's Practice greedy implementation sortings Statement B Codeforces Round 498 (Div. 3) {1006} PROGRAMMING 60672 1200
13329 Stages greedy implementation sortings Statement A Codeforces Round 499 (Div. 2) {1011} PROGRAMMING 60851 1000
27044 Heist greedy implementation sortings Statement A Codeforces Round 509 (Div. 2) {1041} PROGRAMMING Codeforces Round #509 (Div. 2) Editorial 800
2593 Pick Heroes greedy implementation interactive sortings Statement C Mail.Ru Cup 2018 Round 3 {1056} PROGRAMMING Mail.Ru Cup 2018 Round 3 Editorial 1700
7700 Views Matter greedy implementation sortings Statement B Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 1500
2594 TV Shows data structures greedy implementation sortings Statement D Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 2000
1116 New Year and the Acquaintance Estimation binary search data structures graphs greedy implementation math sortings Statement E Good Bye 2018 {1091} PROGRAMMING Editorial 2400
16103 Lunar New Year and Number Division greedy implementation math sortings Statement C Codeforces Round 536 (Div. 2) {1106} PROGRAMMING Tutorial 1000
18434 Parity Alternated Deletions greedy implementation sortings Statement B Codeforces Round 550 (Div. 3) {1144} PROGRAMMING 66307 1000
6605 Ugly Pairs dfs and similar greedy implementation sortings strings Statement B Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 1800
8505 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
2725 Candy Box (hard version) greedy implementation sortings Statement G Codeforces Round 570 (Div. 3) {1183} PROGRAMMING Tutorial 2100
19862 Shooting greedy implementation sortings Statement B Codeforces Round 587 (Div. 3) {1216} PROGRAMMING Codeforces Round #587 (Div. 3) Editorial 1000
4560 Balanced Removals (Harder) binary search constructive algorithms divide and conquer greedy implementation sortings Statement C2 Codeforces Global Round 5 {1237} PROGRAMMING T 1900
17358 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
3471 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
26296 Assigning to Classes greedy implementation sortings Statement B Codeforces Round 618 (Div. 2) {1300} PROGRAMMING 750.0 Codeforces Round #618 Editorial 1000
17937 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
1838 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
4172 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
4641 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
39720 Two Teams Composing binary search greedy implementation sortings Statement C Codeforces Round 634 (Div. 3) {1335} PROGRAMMING 75993 1100
3885 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
8906 Task On The Board constructive algorithms greedy implementation sortings Statement D Codeforces Round 650 (Div. 3) {1367} PROGRAMMING Codeforces Round #650 (Div. 3) Editorial
2491 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
11159 Odd-Even Subsequence binary search dp greedy implementation sortings Statement D Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 2000.0 Editorial — Codeforces Round #651
15105 Reading Books (easy version) data structures greedy implementation sortings Statement E1 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
1742 Mastermind constructive algorithms greedy implementation sortings Statement C Codeforces Round 658 (Div. 1) {1381} PROGRAMMING 2000.0 Codeforces Round #658 Editorial 2500
2636 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
24706 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
17607 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
26624 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
11530 Chess Cheater greedy implementation sortings Statement B Codeforces Global Round 11 {1427} PROGRAMMING 750.0 Editorial of Global Round 11 1400
20385 Barrels greedy implementation sortings Statement B Educational Codeforces Round 96 (Rated for Div. 2) {1430} PROGRAMMING Educational Codeforces Round 96 — Editorial
37747 Replacing Elements greedy implementation sortings Statement A Educational Codeforces Round 102 (Rated for Div. 2) {1473} PROGRAMMING Educational Codeforces Round 102 Editorial
14338 Array Destruction constructive algorithms data structures greedy implementation sortings Statement C Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 1500.0 Codeforces Round #696 Editorial
4991 Robot Collisions data structures greedy implementation sortings Statement C Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
8366 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
1952 New School binary search data structures greedy implementation sortings Statement E Hello 2022 {1621} PROGRAMMING 2250.0
4493 Rescheduling the Exam binary search data structures greedy implementation math sortings Statement E Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
18737 Weight of the System of Nested Segments greedy hashing implementation sortings Statement C Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
19430 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
16035 Prof. Slim greedy implementation sortings Statement A Codeforces Round 788 (Div. 2) {1670} PROGRAMMING 500.0 Tutorial 800
20564 Longest Strike data structures greedy implementation sortings two pointers Statement F Codeforces Round 790 (Div. 4) {1676} PROGRAMMING Codeforces Round #790 (Div. 4) Editorial
17813 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)
25512 Colored Balls: Revisited greedy implementation sortings Statement A Educational Codeforces Round 135 (Rated for Div. 2) {1728} PROGRAMMING 106805
62586 Increasing greedy implementation sortings Statement B Codeforces Round 827 (Div. 4) {1742} PROGRAMMING 107962
15850 Elemental Decompress constructive algorithms greedy implementation sortings Statement C Codeforces Round 842 (Div. 2) {1768} PROGRAMMING 1500.0 Codeforces Round #842 (Div. 2) Editorial
21154 Showstopper greedy implementation sortings Statement A Codeforces Round 860 (Div. 2) {1798} PROGRAMMING 500.0 Editorial of Codeforces Round 860 (Div. 2) 800
22721 Subsequence Addition (Easy Version) brute force dp greedy implementation sortings Statement G1 Codeforces Round 859 (Div. 4) {1807} PROGRAMMING 114143
29408 Subsequence Addition (Hard Version) dp greedy implementation math sortings Statement G2 Codeforces Round 859 (Div. 4) {1807} PROGRAMMING 114143
4306 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
17497 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
5645 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
21798 Rudolf and the Another Competition constructive algorithms greedy implementation sortings Statement C Codeforces Round 883 (Div. 3) {1846} PROGRAMMING
4307 Professor Higashikata brute force data structures dsu greedy implementation sortings Statement D Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 2000.0 Tutorial
26129 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
64619 Balanced Round brute force greedy implementation sortings Statement D Codeforces Round 886 (Div. 4) {1850} PROGRAMMING Codeforces Round #886 (Div. 4) Editorial
18580 Queue Sort greedy implementation sortings Statement E Codeforces Round 909 (Div. 3) {1899} PROGRAMMING Разбор Codeforces Round 909 (Div. 3)
5838 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
10294 Bicycles dp graphs greedy implementation shortest paths sortings Statement G Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
27442 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
4631 01 Tree data structures divide and conquer greedy implementation sortings trees Statement D Hello 2024 {1919} PROGRAMMING 1500.0 2100
10791 Long Inversions brute force greedy implementation sortings Statement E Codeforces Round 938 (Div. 3) {1955} PROGRAMMING 128243
15222 Permutation Counting binary search greedy implementation math sortings Statement A Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 750.0 Tutorial 1400
31022 Binary Cut dp greedy implementation sortings strings Statement D Codeforces Round 944 (Div. 4) {1971} PROGRAMMING Codeforces Round 944 (Div. 4) Editorial 1100
9977 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
20905 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
27655 Soccer greedy implementation math sortings Statement A Codeforces Round 955 (Div. 2, with prizes from NEAR!) {1982} PROGRAMMING 500.0 130839
6787 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
7820 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
6497 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
28726 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
2089 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
5496 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
6893 Gravity Falls greedy implementation sortings Statement F Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
4597 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
17986 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
37083 Isamatdin and His Magic Wand! constructive algorithms greedy implementation sortings Statement C Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
5885 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
3241 Mooclear Reactor 2 data structures greedy implementation sortings Statement F Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
14973 Cyclists games greedy implementation sortings Statement B Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1000.0 Tutorial
1454 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