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
17984 Longest Regular Bracket Sequence constructive algorithms data structures dp greedy sortings strings Statement C Codeforces Beta Round 5 {5} PROGRAMMING C, D и E с CBR5 - разбор 1900
2047 Big Maximum Sum data structures dp greedy implementation math trees Statement D Codeforces Beta Round 67 (Div. 2) {75} PROGRAMMING Codeforces Beta Round #67 (Div. 2) Editorial 2100
15097 Color the Fence data structures dp greedy implementation Statement B Codeforces Round 202 (Div. 2) {349} PROGRAMMING Editorial for Codeforces Round #202 1700
2621 LIS of Sequence data structures dp greedy hashing math Statement E Codeforces Round 277 (Div. 2) {486} PROGRAMMING Codeforces Round #277(Div. 2) Editorial 2400
4209 Arthur and Table brute force data structures dp greedy math sortings Statement C Codeforces Round 311 (Div. 2) {557} PROGRAMMING Codeforces Round #311 (Div.2) Editorial 1900
606 Raffles data structures dp greedy math Statement G 8VC Venture Cup 2016 - Elimination Round {626} PROGRAMMING 23522 3000
2483 Maxim and Array constructive algorithms data structures greedy math Statement D Codeforces Round 374 (Div. 2) {721} PROGRAMMING Codeforces Round #374 (Div. 2) Editorial 2000
4380 Cashback data structures dp greedy math Statement E Codeforces Round 466 (Div. 2) {940} PROGRAMMING [Editorial] Codeforces Round #466 (Div. 2) 2000
2171 Kuro and GCD and XOR and SUM binary search bitmasks brute force data structures dp dsu greedy math number theory strings trees Statement D Codeforces Round 482 (Div. 2) {979} PROGRAMMING 1750.0 Codeforces Round #482 (Div. 2) Editorial 2200
2049 Leaving the Bar brute force data structures geometry greedy math sortings Statement C Codeforces Round 492 (Div. 1) [Thanks, uDebug!] {995} PROGRAMMING Editorial for Codeforces Round #492 [Thanks u-Debug!] 2200
851 Timetable constructive algorithms data structures greedy math Statement A Codeforces Round 507 (Div. 1, based on Olympiad of Metropolises) {1039} PROGRAMMING 61668 2400
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
3657 Ivan and Burgers data structures divide and conquer greedy math Statement F Codeforces Round 532 (Div. 2) {1100} PROGRAMMING Unofficial Tutorial 2600
2114 Permutation recovery constructive algorithms data structures dfs and similar graphs greedy math sortings Statement C Codeforces Round 559 (Div. 1) {1158} PROGRAMMING 66993 2300
2444 Serge and Dining Room binary search data structures graph matchings greedy implementation math trees Statement C Codeforces Round 569 (Div. 1) {1179} PROGRAMMING Editorial of Round #569 2400
7808 Exam in BerSU (hard version) brute force data structures greedy math Statement C2 Codeforces Round 568 (Div. 2) {1185} PROGRAMMING Editorial for Codeforces Round #568 (Div. 2) 1700
2763 You Are Given a WASD-string... brute force data structures dp greedy implementation math strings Statement C Educational Codeforces Round 70 (Rated for Div. 2) {1202} PROGRAMMING 68972 2100
3390 Kirk and a Binary String (hard version) data structures greedy math strings Statement D2 Codeforces Round 581 (Div. 2) {1204} PROGRAMMING 69244 2100
228 Moving Walkways data structures greedy math Statement H Codeforces Round 584 - Dasha Code Championship - Elimination Round (rated, open for everyone, Div. 1 + Div. 2) {1209} PROGRAMMING 69791 3300
2061 Sum Queries? data structures greedy implementation math Statement E Educational Codeforces Round 72 (Rated for Div. 2) {1217} PROGRAMMING Educational Codeforces Round 72 Editorial 2300
3868 Decreasing Debts constructive algorithms data structures graphs greedy implementation math two pointers Statement D Codeforces Global Round 6 {1266} PROGRAMMING Codeforces Global Round 6 Editorial 2000
1776 Beautiful Rectangle brute force combinatorics constructive algorithms data structures greedy math Statement C Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4) {1276} PROGRAMMING Technocup 2020 — Elimination Round 4 + Codeforces Round 606: Editorial 2300
12646 MEX maximizing data structures greedy implementation math Statement D Codeforces Round 615 (Div. 3) {1294} PROGRAMMING Codeforces Round #615 (Div. 3) Editorial 1600
252 Dune II: Battle For Arrakis *special data structures greedy math Statement F Kotlin Heroes: Episode 4 {1346} PROGRAMMING Kotlin Heroes: Episode 4 — Editorial 2000
6072 Choosing flowers binary search data structures greedy math sortings two pointers Statement C Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 1250.0 Codeforces Round #657 Editorial 2000
11042 Pinkie Pie Eats Patty-cakes binary search constructive algorithms data structures greedy math sortings Statement C Codeforces Round 662 (Div. 2) {1393} PROGRAMMING 1500.0 Codeforces Round #662 Editorial
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
3804 Three Sequences binary search data structures greedy math Statement D Codeforces Round 670 (Div. 2) {1406} PROGRAMMING 2000.0 Codeforces Round #670 (Div. 2) Editorial
4193 Carrots for Rabbits binary search data structures greedy math Statement E Codeforces Raif Round 1 (Div. 1 + Div. 2) {1428} PROGRAMMING 1750.0 Codeforces Raif Round 1 Editorial
7462 Painting the Array I constructive algorithms data structures dp greedy implementation Statement B1 Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 750.0 Editorial of Codeforces Round #700
4425 Painting the Array II data structures dp greedy implementation Statement B2 Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 750.0 Editorial of Codeforces Round #700
18297 Equalize the Array binary search data structures greedy math sortings Statement F Codeforces Round 702 (Div. 3) {1490} PROGRAMMING Codeforces Round #702 (Div. 3) Editorial
19927 Card Deck data structures greedy math Statement B Codeforces Round 704 (Div. 2) {1492} PROGRAMMING 1000.0 Codeforces Round #704 Editorial
9092 Square-free division (easy version) data structures dp greedy math number theory Statement E1 Codeforces Round 708 (Div. 2) {1497} PROGRAMMING 1500.0 Codeforces Round #708 Editorial 1700
1910 Square-free division (hard version) data structures dp greedy hashing math number theory Statement E2 Codeforces Round 708 (Div. 2) {1497} PROGRAMMING 1500.0 Codeforces Round #708 Editorial 2500
1721 Complete the MST data structures dfs and similar dsu graphs greedy math Statement C Codeforces Round 715 (Div. 1) {1508} PROGRAMMING 1500.0 Codeforces Round #715 Editorial
4196 Pchelyonok and Segments binary search data structures dp greedy math Statement E Codeforces Round 750 (Div. 2) {1582} PROGRAMMING 2500.0 Codeforces Round #750 (Div.2) Editorial
483 A Stroll Around the Matrix data structures greedy math Statement G Deltix Round, Autumn 2021 (open for everyone, rated, Div. 1 + Div. 2) {1609} PROGRAMMING 3250.0 Deltix Round, Autumn 2021. Editorial 3000
1922 Trader Problem binary search data structures dsu greedy math sortings Statement G Codeforces Round 760 (Div. 3) {1618} PROGRAMMING Codeforces Round #760 (Div. 3) Editorial
10188 MEX and Increments constructive algorithms data structures dp greedy math sortings Statement E Codeforces Round 762 (Div. 3) {1619} PROGRAMMING Tutorial
5313 New Year Concert binary search data structures dp greedy math number theory two pointers Statement D Codeforces Round 769 (Div. 2) {1632} PROGRAMMING 2000.0 Editorial of Codeforces Round #769
4457 Rescheduling the Exam binary search data structures greedy implementation math sortings Statement E Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
4443 Reverse Sort Sum constructive algorithms data structures greedy implementation math two pointers Statement D Codeforces Round 782 (Div. 2) {1659} PROGRAMMING 2000.0 Codeforces Round #782 (Div. 2) Editorial
6260 Permutation Restoration binary search data structures greedy math sortings Statement D Educational Codeforces Round 131 (Rated for Div. 2) {1701} PROGRAMMING Educational Codeforces Round 131 Editorial
9433 Equate Multisets constructive algorithms data structures graph matchings greedy math number theory Statement F Codeforces Round 805 (Div. 3) {1702} PROGRAMMING 104763
3449 Fibonacci Strings brute force data structures greedy implementation math number theory Statement B Codeforces Round 814 (Div. 1) {1718} PROGRAMMING 1250.0 Codeforces Round #814 (Div. 1, Div. 2) Editorial
1851 Tonya and Burenka-179 brute force data structures greedy math number theory Statement C Codeforces Round 814 (Div. 1) {1718} PROGRAMMING 1250.0 Codeforces Round #814 (Div. 1, Div. 2) Editorial
5898 Burenka and Traditions (hard version) data structures dp greedy math two pointers Statement A2 Codeforces Round 814 (Div. 1) {1718} PROGRAMMING 500.0 Codeforces Round #814 (Div. 1, Div. 2) Editorial
22399 Interesting Sum data structures greedy math Statement B Codeforces Round 815 (Div. 2) {1720} PROGRAMMING 1000.0 Codeforces Round #815 (Div. 2) Editorial
17912 Minimum Notation data structures greedy math sortings Statement C Codeforces Round 823 (Div. 2) {1730} PROGRAMMING 1500.0 Codeforces Round #823 — editorial 1200
9047 Knowledge Cards constructive algorithms data structures greedy math Statement D Codeforces Round 831 (Div. 1 + Div. 2) {1740} PROGRAMMING 1750.0 Tutorial 1500
1655 Bracket Cost binary search data structures divide and conquer dp greedy strings Statement E CodeTON Round 3 (Div. 1 + Div. 2, Rated, Prizes!) {1750} PROGRAMMING 2250.0 CodeTON Round 3 (Div. 1 + Div. 2) Editorial
5478 Restore the Permutation binary search data structures greedy math Statement G Codeforces Round 834 (Div. 3) {1759} PROGRAMMING 109254
4493 All Possible Digits binary search data structures greedy math number theory Statement F Codeforces Round 834 (Div. 3) {1759} PROGRAMMING 109254
22957 Binary Inversions data structures greedy math Statement E Codeforces Round 835 (Div. 4) {1760} PROGRAMMING 109348
12311 Recent Actions data structures greedy implementation math Statement A Codeforces Round 854 by cybercats (Div. 1 + Div. 2) {1799} PROGRAMMING 500.0 Codeforces Round #854 Editorial
2422 Fill the Matrix data structures greedy math Statement E Educational Codeforces Round 150 (Rated for Div. 2) {1841} PROGRAMMING 117262
6329 Omsk Metro (simple version) data structures dfs and similar dp greedy math trees Statement F1 Codeforces Round 881 (Div. 3) {1843} PROGRAMMING Codeforces Round #881 (Div. 3) Editorial
8991 Rating System brute force data structures dp greedy implementation math Statement D Educational Codeforces Round 151 (Rated for Div. 2) {1845} PROGRAMMING 117791
1026 The Boss's Identity binary search bitmasks data structures dfs and similar greedy math sortings Statement F Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 3000.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
7373 Lisa and the Martians bitmasks data structures greedy math sortings strings trees Statement F Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
2088 Ina of the Mountain data structures dp greedy math Statement C Codeforces Round 887 (Div. 1) {1852} PROGRAMMING 1250.0 Codeforces Round 887 (Div 1, Div 2) Tutorial
13137 Heavy Intervals constructive algorithms data structures dsu greedy math sortings Statement C Pinely Round 3 (Div. 1 + Div. 2) {1909} PROGRAMMING 1500.0 Editorial of Pinely Round 3 (Div. 1 + Div. 2)
34259 Romantic Glasses data structures greedy math Statement E Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
1976 Paint Charges data structures dp greedy math Statement G Codeforces Round 923 (Div. 3) {1927} PROGRAMMING 125597
5153 Lonely Mountain Dungeons binary search brute force data structures greedy math ternary search Statement D Codeforces Round 924 (Div. 2) {1928} PROGRAMMING 1750.0 Codeforces Round 924 Editorial
1645 Distance Learning Courses in MAC binary search bitmasks data structures greedy implementation math Statement E Codeforces Round 932 (Div. 2) {1935} PROGRAMMING 2500.0 Codeforces Round #932 (Div. 2) Editorial
2955 Chain Reaction data structures dsu greedy implementation math number theory Statement E Educational Codeforces Round 164 (Rated for Div. 2) {1954} PROGRAMMING Educational Codeforces Round 164 Editorial
5687 Shop Game data structures greedy math sortings Statement D Educational Codeforces Round 165 (Rated for Div. 2) {1969} PROGRAMMING Educational Codeforces Round 165 Editorial 1900
16778 Cat, Fox and the Lonely Array binary search bitmasks data structures greedy math two pointers Statement B Codeforces Round 945 (Div. 2) {1973} PROGRAMMING 1000.0 Editorial for Codeforces Round #945 (Div. 2) 1300
1298 Splittable Permutations combinatorics data structures dfs and similar greedy math trees Statement E Educational Codeforces Round 166 (Rated for Div. 2) {1976} PROGRAMMING Educational Codeforces Round 166 Editorial
8011 Nikita and LCM brute force data structures dp greedy math number theory sortings Statement C Codeforces Round 948 (Div. 2) {1977} PROGRAMMING 1750.0 129858 1900
13595 Elections data structures greedy implementation math Statement D Codeforces Round 953 (Div. 2) {1978} PROGRAMMING 1500.0 130527
10131 Bouquet (Hard Version) binary search data structures greedy math sortings two pointers Statement B2 Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 500.0 Video Tutorial
10254 Squaring brute force constructive algorithms data structures greedy implementation math number theory Statement C Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 1750.0 Video Tutorial
2277 Eliminating Balls With Merging (Easy Version) binary search brute force data structures divide and conquer dp greedy math Statement E1 Codeforces Round 965 (Div. 2) {1998} PROGRAMMING 1750.0 Video Tutorial
16170 Photoshoot for Gorillas combinatorics data structures greedy math Statement E Codeforces Round 966 (Div. 3) {2000} PROGRAMMING 132689
1410 Make a Palindrome brute force data structures dp greedy math Statement F Educational Codeforces Round 169 (Rated for Div. 2) {2004} PROGRAMMING Educational Codeforces Round 169 Editorial
7440 Minimize the Difference binary search data structures greedy implementation math Statement D Codeforces Round 973 (Div. 2) {2013} PROGRAMMING 2000.0 134298
237 Complex Segments (Easy Version) binary search data structures divide and conquer dsu greedy math sortings Statement E1 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 2250.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
203 Complex Segments (Hard Version) binary search data structures divide and conquer dsu greedy math sortings Statement E2 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
1918 Digital Village (Easy Version) brute force data structures dp dsu graphs greedy implementation math shortest paths trees Statement E1 Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 1750.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
676 Digital Village (Extreme Version) data structures dp graphs greedy math Statement E3 Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 1000.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
953 Boss, Thirsty data structures dp greedy math Statement D Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 2500.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
21483 Meaning Mean data structures greedy math sortings Statement A Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 500.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
14084 Sakurako, Kosuke, and the Permutation brute force data structures dfs and similar dsu fft greedy math Statement E Codeforces Round 981 (Div. 3) {2033} PROGRAMMING 135520
5809 Yet Another Real Number Problem binary search brute force data structures dp greedy implementation math two pointers Statement D Codeforces Global Round 27 {2035} PROGRAMMING 1500.0 Codeforces Global Round 27 Editorial
156 Barrels data structures greedy math Statement E 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 2900
11149 Sums on Segments binary search brute force data structures dp greedy math Statement C Educational Codeforces Round 173 (Rated for Div. 2) {2043} PROGRAMMING Educational Codeforces Round 173 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
105 Affectionate Arrays (Hard Version) data structures dp graphs greedy math shortest paths two pointers Statement I2 Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 2000.0 Good Bye 2024: 2025 is NEAR Editorial
185 Coffee Break data structures greedy greedy math Statement H Hello 2025 {2057} PROGRAMMING 4500.0
5354 Gifts Order data structures greedy math Statement D Hello 2025 {2057} PROGRAMMING 2250.0
2259 Kevin and Binary String (Easy Version) binary search brute force data structures dp greedy implementation strings two pointers Statement F1 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) {2061} PROGRAMMING 2000.0 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial
14621 Kevin and Geometry brute force constructive algorithms data structures geometry greedy implementation math two pointers Statement B IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) {2061} PROGRAMMING 1000.0 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial
10709 Kevin and Numbers brute force data structures greedy implementation math Statement D IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) {2061} PROGRAMMING 1500.0 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial
4991 Game With Triangles binary search data structures dp greedy math ternary search two pointers Statement D Codeforces Round 1000 (Div. 2) {2063} PROGRAMMING 2250.0 Codeforces Round 1000 (Div. 2) — 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
1269 Canteen (Hard Version) binary search data structures greedy math two pointers Statement B2 Codeforces Round 1012 (Div. 1) {2089} PROGRAMMING 500.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
1492 Gleb and Boating brute force constructive algorithms data structures dp graphs greedy math shortest paths Statement G Codeforces Round 1013 (Div. 3) {2091} PROGRAMMING Codeforces Round 1013 (Div. 3) Editorial
14806 MEX Count binary search data structures greedy sortings two pointers Statement E Codeforces Round 1034 (Div. 3) {2123} PROGRAMMING Codeforces Round 1034 (Div. 3) Editorial
4699 Unjust Binary Life binary search binary search data structures greedy greedy math two pointers Statement F Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
12091 Triple Removal data structures greedy math Statement C Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 1500.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
1004 Inverse Minimum Partition (Easy Version) binary search data structures dp greedy math two pointers Statement D1 Codeforces Round 1058 (Div. 1) {2159} PROGRAMMING 1500.0 Codeforces Round 1058 Editorial
274 Fuzzy Concatenation (Easy Version) binary search bitmasks brute force data structures greedy string suffix structures Statement E1 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2000.0 Tutorial
192 Fuzzy Concatenation (Hard version) binary search data structures dp greedy string suffix structures Statement E2 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 1000.0 Tutorial
976 Double Bracket Sequence data structures dp greedy sortings Statement D Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2250.0 Tutorial