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
7331 Fruits greedy implementation sortings Statement C Codeforces Beta Round 12 (Div 2 Only) {12} PROGRAMMING 1400
20687 Burglar and Matches greedy implementation sortings Statement B Codeforces Beta Round 16 (Div. 2 Only) {16} PROGRAMMING Codeforces Beta Round #16 Tutorial 1300
8241 Replacement greedy implementation sortings Statement A Codeforces Beta Round 97 (Div. 1) {135} PROGRAMMING Codeforces Beta Round #97: editorial 1400
45854 Business trip greedy implementation sortings Statement A Codeforces Round 106 (Div. 2) {149} PROGRAMMING Codeforces Round #106 (Div. 2) Tutorial 1100
1513 Geometry Horse greedy implementation sortings two pointers Statement C Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 1600
6904 Sockets greedy implementation sortings Statement A Codeforces Round 159 (Div. 2) {257} PROGRAMMING Codeforces Round #159 (Div. 2) Разбор Задач 1200
9759 Squares greedy implementation sortings Statement B Codeforces Round 161 (Div. 2) {263} PROGRAMMING Codeforces Round #161 Tutorial 1000
39193 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
26282 Building Permutation greedy implementation sortings Statement C Codeforces Round 175 (Div. 2) {285} PROGRAMMING Codeforces Round #175 (Div. 2) Tutorial 1300
5933 Ilya and Matrix constructive algorithms greedy implementation sortings Statement C Codeforces Round 186 (Div. 2) {313} PROGRAMMING Tutorial 1400
273166 Helpful Maths greedy implementation sortings strings Statement A Codeforces Round 197 (Div. 2) {339} PROGRAMMING Codeforces Round #197 — Tutorial 900
6816 Bombs greedy implementation sortings Statement C Codeforces Round 203 (Div. 2) {350} PROGRAMMING Editorial Codeforces Round #203 (Div. 2) 1600
2430 Two Heaps combinatorics constructive algorithms greedy implementation math sortings Statement B Codeforces Round 205 (Div. 2) {353} PROGRAMMING 9145 1800
7336 Sereja and Stairs greedy implementation sortings Statement B Codeforces Round 223 (Div. 2) {381} PROGRAMMING Codeforces Round #223 — Tutorial 1100
3799 Multitasking greedy implementation sortings two pointers Statement B Codeforces Round 225 (Div. 2) {384} PROGRAMMING Codeforces Round #225 — Editorial 1500
125814 Gravity Flip greedy implementation sortings Statement A Codeforces Round 238 (Div. 2) {405} PROGRAMMING Codeforces Round #238 Tutorial 1000
8455 Megacity binary search greedy implementation sortings Statement B Codeforces Round 242 (Div. 2) {424} PROGRAMMING Codeforces Round #242 (Div. 2) Editorial 1200
69233 Choosing Teams greedy implementation sortings Statement A Codeforces Round 246 (Div. 2) {432} PROGRAMMING Codeforces Round #246 (Div. 2) Editorial 900
10426 The Child and Set bitmasks greedy implementation sortings Statement B Codeforces Round 250 (Div. 2) {437} PROGRAMMING 12513 1500
8420 Towers brute force constructive algorithms greedy implementation sortings Statement B Codeforces Round 274 (Div. 2) {479} PROGRAMMING Codeforces Round #274: editorial 1400
10567 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
70095 Team Olympiad greedy implementation sortings Statement A Codeforces Round 279 (Div. 2) {490} PROGRAMMING Codeforces Round #279 (Div. 2) Editorial 900
21656 Amr and Music greedy implementation sortings Statement A Codeforces Round 287 (Div. 2) {507} PROGRAMMING Editorial 1100
5078 Clique Problem data structures dp greedy implementation sortings Statement D Codeforces Round 296 (Div. 2) {527} PROGRAMMING Codeforces Round #296 Editorial 2100
29272 Queue greedy implementation sortings Statement D Codeforces Round 303 (Div. 2) {545} PROGRAMMING Codeforces Round #303 (Div.2) editorial 1400
18592 Soldier and Badges brute force greedy implementation sortings Statement B Codeforces Round 304 (Div. 2) {546} PROGRAMMING Codeforces Round #304 (Div.2) editorial 1300
8080 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
19380 Флеш-карты greedy implementation sortings Statement A Educational Codeforces Round 3 {609} PROGRAMMING Editorial 800
5023 Checkpoints greedy implementation sortings Statement B AIM Tech Round 3 (Div. 2) {709} PROGRAMMING 1500
2264 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
10541 USB vs. PS/2 greedy implementation sortings two pointers Statement B Educational Codeforces Round 17 {762} PROGRAMMING Tutorial 1400
11034 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
4930 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
10532 Nested Segments greedy implementation sortings Statement C Educational Codeforces Round 43 (Rated for Div. 2) {976} PROGRAMMING 59195 1500
4871 Petya's Exams greedy implementation sortings Statement G Codeforces Round 481 (Div. 3) {978} PROGRAMMING T 1800
6042 Knights of a Polygonal Table greedy implementation sortings Statement B Codeforces Round 488 by NEAR (Div. 2) {994} PROGRAMMING Codeforces Round #488 editorial 1400
14618 Polycarp's Practice greedy implementation sortings Statement B Codeforces Round 498 (Div. 3) {1006} PROGRAMMING 60672 1200
13238 Stages greedy implementation sortings Statement A Codeforces Round 499 (Div. 2) {1011} PROGRAMMING 60851 1000
26820 Heist greedy implementation sortings Statement A Codeforces Round 509 (Div. 2) {1041} PROGRAMMING Codeforces Round #509 (Div. 2) Editorial 800
2571 Pick Heroes greedy implementation interactive sortings Statement C Mail.Ru Cup 2018 Round 3 {1056} PROGRAMMING Mail.Ru Cup 2018 Round 3 Editorial 1700
7633 Views Matter greedy implementation sortings Statement B Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 1500
2558 TV Shows data structures greedy implementation sortings Statement D Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 2000
1086 New Year and the Acquaintance Estimation binary search data structures graphs greedy implementation math sortings Statement E Good Bye 2018 {1091} PROGRAMMING Editorial 2400
15738 Lunar New Year and Number Division greedy implementation math sortings Statement C Codeforces Round 536 (Div. 2) {1106} PROGRAMMING Tutorial 1000
18309 Parity Alternated Deletions greedy implementation sortings Statement B Codeforces Round 550 (Div. 3) {1144} PROGRAMMING 66307 1000
6569 Ugly Pairs dfs and similar greedy implementation sortings strings Statement B Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 1800
8308 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
2663 Candy Box (hard version) greedy implementation sortings Statement G Codeforces Round 570 (Div. 3) {1183} PROGRAMMING Tutorial 2100
19636 Shooting greedy implementation sortings Statement B Codeforces Round 587 (Div. 3) {1216} PROGRAMMING Codeforces Round #587 (Div. 3) Editorial 1000
4532 Balanced Removals (Harder) binary search constructive algorithms divide and conquer greedy implementation sortings Statement C2 Codeforces Global Round 5 {1237} PROGRAMMING T 1900
17123 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
3395 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
25867 Assigning to Classes greedy implementation sortings Statement B Codeforces Round 618 (Div. 2) {1300} PROGRAMMING 750.0 Codeforces Round #618 Editorial 1000
17719 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
1802 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
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
4566 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
38877 Two Teams Composing binary search greedy implementation sortings Statement C Codeforces Round 634 (Div. 3) {1335} PROGRAMMING 75993 1100
3843 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
8768 Task On The Board constructive algorithms greedy implementation sortings Statement D Codeforces Round 650 (Div. 3) {1367} PROGRAMMING Codeforces Round #650 (Div. 3) Editorial
2450 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
10812 Odd-Even Subsequence binary search dp greedy implementation sortings Statement D Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 2000.0 Editorial — Codeforces Round #651
14943 Reading Books (easy version) data structures greedy implementation sortings Statement E1 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
1708 Mastermind constructive algorithms greedy implementation sortings Statement C Codeforces Round 658 (Div. 1) {1381} PROGRAMMING 2000.0 Codeforces Round #658 Editorial 2500
2592 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
24421 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
17367 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
26357 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
11438 Chess Cheater greedy implementation sortings Statement B Codeforces Global Round 11 {1427} PROGRAMMING 750.0 Editorial of Global Round 11 1400
20188 Barrels greedy implementation sortings Statement B Educational Codeforces Round 96 (Rated for Div. 2) {1430} PROGRAMMING Educational Codeforces Round 96 — Editorial
37276 Replacing Elements greedy implementation sortings Statement A Educational Codeforces Round 102 (Rated for Div. 2) {1473} PROGRAMMING Educational Codeforces Round 102 Editorial
14107 Array Destruction constructive algorithms data structures greedy implementation sortings Statement C Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 1500.0 Codeforces Round #696 Editorial
4809 Robot Collisions data structures greedy implementation sortings Statement C Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
8327 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
1914 New School binary search data structures greedy implementation sortings Statement E Hello 2022 {1621} PROGRAMMING 2250.0
4457 Rescheduling the Exam binary search data structures greedy implementation math sortings Statement E Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
18473 Weight of the System of Nested Segments greedy hashing implementation sortings Statement C Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
19378 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
15989 Prof. Slim greedy implementation sortings Statement A Codeforces Round 788 (Div. 2) {1670} PROGRAMMING 500.0 Tutorial 800
19985 Longest Strike data structures greedy implementation sortings two pointers Statement F Codeforces Round 790 (Div. 4) {1676} PROGRAMMING Codeforces Round #790 (Div. 4) Editorial
17718 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)
25432 Colored Balls: Revisited greedy implementation sortings Statement A Educational Codeforces Round 135 (Rated for Div. 2) {1728} PROGRAMMING 106805
60729 Increasing greedy implementation sortings Statement B Codeforces Round 827 (Div. 4) {1742} PROGRAMMING 107962
15681 Elemental Decompress constructive algorithms greedy implementation sortings Statement C Codeforces Round 842 (Div. 2) {1768} PROGRAMMING 1500.0 Codeforces Round #842 (Div. 2) Editorial
21040 Showstopper greedy implementation sortings Statement A Codeforces Round 860 (Div. 2) {1798} PROGRAMMING 500.0 Editorial of Codeforces Round 860 (Div. 2) 800
22192 Subsequence Addition (Easy Version) brute force dp greedy implementation sortings Statement G1 Codeforces Round 859 (Div. 4) {1807} PROGRAMMING 114143
27659 Subsequence Addition (Hard Version) dp greedy implementation math sortings Statement G2 Codeforces Round 859 (Div. 4) {1807} PROGRAMMING 114143
4193 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
17242 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
5535 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
21439 Rudolf and the Another Competition constructive algorithms greedy implementation sortings Statement C Codeforces Round 883 (Div. 3) {1846} PROGRAMMING
4254 Professor Higashikata brute force data structures dsu greedy implementation sortings Statement D Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 2000.0 Tutorial
24201 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
60275 Balanced Round brute force greedy implementation sortings Statement D Codeforces Round 886 (Div. 4) {1850} PROGRAMMING Codeforces Round #886 (Div. 4) Editorial
18202 Queue Sort greedy implementation sortings Statement E Codeforces Round 909 (Div. 3) {1899} PROGRAMMING Разбор Codeforces Round 909 (Div. 3)
5666 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
9594 Bicycles dp graphs greedy implementation shortest paths sortings Statement G Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
26939 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
4555 01 Tree data structures divide and conquer greedy implementation sortings trees Statement D Hello 2024 {1919} PROGRAMMING 1500.0 2100
10523 Long Inversions brute force greedy implementation sortings Statement E Codeforces Round 938 (Div. 3) {1955} PROGRAMMING 128243
14908 Permutation Counting binary search greedy implementation math sortings Statement A Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 750.0 Tutorial 1400
30478 Binary Cut dp greedy implementation sortings strings Statement D Codeforces Round 944 (Div. 4) {1971} PROGRAMMING Codeforces Round 944 (Div. 4) Editorial 1100
9828 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
20673 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
27468 Soccer greedy implementation math sortings Statement A Codeforces Round 955 (Div. 2, with prizes from NEAR!) {1982} PROGRAMMING 500.0 130839
6579 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
7662 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
6248 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
28254 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
2028 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
5391 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
6539 Gravity Falls greedy implementation sortings Statement F Codeforces Round 1050 (Div. 4) {2148} PROGRAMMING Codeforces Round 1050 (Div. 4) Editorial
3538 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
16364 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
35775 Isamatdin and His Magic Wand! constructive algorithms greedy implementation sortings Statement C Codeforces Round 1062 (Div. 4) {2167} PROGRAMMING Arpa Video Tutorial
5504 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
2754 Mooclear Reactor 2 data structures greedy implementation sortings Statement F Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
13216 Cyclists games greedy implementation sortings Statement B Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1000.0 Tutorial