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
2469 Partial Teacher dp graphs greedy implementation Statement A Manthan 2011 {67} PROGRAMMING 1800
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
2511 File List dp greedy implementation Statement B VK Cup 2012 Round 3 (Unofficial Div. 2 Edition) {174} PROGRAMMING VK Cup 2012 Round 3 — Разбор 1500
16293 Little Girl and Maximum XOR bitmasks dp greedy implementation math Statement D Codeforces Round 169 (Div. 2) {276} PROGRAMMING Codeforces Round #169 — Unofficial Editorial 1800
334 Binary Key dp greedy implementation Statement E Codeforces Round 193 (Div. 2) {332} PROGRAMMING 8447 2600
15097 Color the Fence data structures dp greedy implementation Statement B Codeforces Round 202 (Div. 2) {349} PROGRAMMING Editorial for Codeforces Round #202 1700
3093 Jeff and Rounding dp greedy implementation math Statement A Codeforces Round 204 (Div. 1) {351} PROGRAMMING Codeforces Round #204 — tutorial 1900
8690 Booking System binary search dp greedy implementation Statement C Codeforces Round 241 (Div. 2) {416} PROGRAMMING Codeforces Round #241 — editorial 1600
51545 Given Length and Sum of Digits... dp greedy implementation Statement C Codeforces Round 277.5 (Div. 2) {489} PROGRAMMING Codeforces Round #277.5 (Div. 2) Editorial [A-D for now] 1400
2385 Sums of Digits dp greedy implementation Statement C Codeforces Round 289 (Div. 2, ACM ICPC Rules) {509} PROGRAMMING Tutorial CodeForces Round 289 (Div.2) (Second Winter Computer Camp Selection 2015) 2000
5078 Clique Problem data structures dp greedy implementation sortings Statement D Codeforces Round 296 (Div. 2) {527} PROGRAMMING Codeforces Round #296 Editorial 2100
19317 Quasi Binary constructive algorithms dp greedy implementation Statement B Codeforces Round 300 {538} PROGRAMMING Codeforces Round #300 Editorial (+challenges) 1400
8980 Mike and Fun brute force dp greedy implementation Statement B Codeforces Round 305 (Div. 2) {548} PROGRAMMING Codeforces Round #305 Editorial 1400
43520 Two Substrings brute force dp greedy implementation strings Statement A Codeforces Round 306 (Div. 2) {550} PROGRAMMING Разбор задач Codeforces Round #306 (Div. 2) 1500
1733 Vanya and Brackets brute force dp expression parsing greedy implementation strings Statement E Codeforces Round 308 (Div. 2) {552} PROGRAMMING Codeforces #308 (Div. 2) Editorial 2300
24106 Joysticks dp greedy implementation math Statement A Codeforces Round 345 (Div. 2) {651} PROGRAMMING 1100
4369 Recycling Bottles dp geometry greedy implementation Statement A Codeforces Round 352 (Div. 1) {671} PROGRAMMING Codeforces Round #352 Editorial 1800
54672 Maximum Increase dp greedy implementation Statement A Educational Codeforces Round 15 {702} PROGRAMMING 46324 900
1806 Maximum path dp greedy implementation Statement D Educational Codeforces Round 17 {762} PROGRAMMING Tutorial 2400
1336 Tree Folding dfs and similar dp greedy implementation trees Statement E Codeforces Round 397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined) {765} PROGRAMMING Codeforces Round #397 Editorial 2200
6815 Alyona and Spreadsheet binary search data structures dp greedy implementation two pointers Statement C Codeforces Round 401 (Div. 2) {777} PROGRAMMING Problem analysis of Codeforces Round #401 (Div. 2) 1600
11493 Odd sum dp greedy implementation Statement B Educational Codeforces Round 19 {797} PROGRAMMING 51588 1400
5850 Did you mean... dp greedy implementation Statement C Технокубок 2018 - Отборочный Раунд 1 {858} PROGRAMMING Codeforces Round 434 Div.1+Div.2 (and Technocup 2018 — Elimination Round 1) Editorial 1500
3326 Credit Card data structures dp greedy implementation Statement D Educational Codeforces Round 33 (Rated for Div. 2) {893} PROGRAMMING 55989 1800
13949 The Way to Home dfs and similar dp greedy implementation Statement A Testing Round 14 (Unrated) {910} PROGRAMMING 1100
3670 The Monster dp greedy implementation math Statement A Codeforces Round 459 (Div. 1) {917} PROGRAMMING Codeforces Round #459 Editorial 1900
808 Tanks dp greedy implementation Statement D Educational Codeforces Round 37 (Rated for Div. 2) {920} PROGRAMMING 2600
8852 Slime dp greedy implementation Statement D Codeforces Round 508 (Div. 2) {1038} PROGRAMMING Tutorial 1700
9868 Vasya and Multisets brute force dp greedy implementation math Statement C Educational Codeforces Round 51 (Rated for Div. 2) {1051} PROGRAMMING Educational Codeforces Round 51 Editorial 1400
930 Monsters and Potions brute force dp greedy implementation Statement G 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) {1070} PROGRAMMING Solution to problem M. Algoland and Berland of 2018-2019 ICPC, NEERC 2500
4517 Minimal Segment Cover data structures dfs and similar divide and conquer dp greedy implementation trees Statement E Educational Codeforces Round 66 (Rated for Div. 2) {1175} PROGRAMMING Editorial 2200
15082 Lose it! dp greedy implementation Statement C Codeforces Round 565 (Div. 3) {1176} PROGRAMMING 67598 1300
2531 Treasure Hunting binary search dp greedy implementation Statement D Codeforces Round 577 (Div. 2) {1201} PROGRAMMING Codeforces Round #577 (Div 2) Editorial 2000
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
2519 The World Is Just a Programming Task (Easy Version) brute force dp greedy implementation Statement D1 Codeforces Round 594 (Div. 2) {1248} PROGRAMMING Editorial of Codeforces Round #594 (on the problems of Moscow Team Olympiad) 1900
3395 Portals data structures dp greedy implementation sortings Statement D Codeforces Round 608 (Div. 2) {1271} PROGRAMMING 72247 2100
8575 Berry Jam data structures dp greedy implementation Statement C Educational Codeforces Round 78 (Rated for Div. 2) {1278} PROGRAMMING Educational Codeforces Round 78 Editorial 1600
30624 Just Eat It! dp greedy implementation Statement B Codeforces Round 613 (Div. 2) {1285} PROGRAMMING Codeforces Round #613 (Div. 2) Editorial 1300
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
1362 Cow and Treats binary search combinatorics dp greedy implementation math Statement E Codeforces Round 621 (Div. 1 + Div. 2) {1307} PROGRAMMING 2500.0 Codeforces Round #621 (Div. 1 + Div. 2) Editorial 2400
20861 Even Subset Sum Problem brute force dp greedy implementation Statement A Codeforces Round 626 (Div. 2, based on Moscow Open Olympiad in Informatics) {1323} PROGRAMMING 500.0 Codeforces Round #626 Editorial
2449 Are You Fired? constructive algorithms data structures dp greedy implementation Statement E Codeforces Round 645 (Div. 2) {1358} PROGRAMMING 2000.0 Codeforces Round #645 (Div. 2) Editorial 2400
29358 New Theatre Square brute force dp greedy implementation two pointers Statement B Educational Codeforces Round 88 (Rated for Div. 2) {1359} PROGRAMMING Educational Codeforces Round 88 Editorial 1000
4616 Two Arrays binary search brute force combinatorics dp greedy implementation two pointers Statement E Educational Codeforces Round 89 (Rated for Div. 2) {1366} PROGRAMMING Educational Codeforces Round 89 Editorial
5216 Binary Subsequence Rotation binary search data structures dp greedy implementation Statement E Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 2500.0 Editorial — Codeforces Round #651
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
19332 Pluses and Minuses binary search dp greedy implementation math Statement C Educational Codeforces Round 90 (Rated for Div. 2) {1373} PROGRAMMING Educational Codeforces Round 90 Editorial
6902 Captain Flint and Treasure data structures dfs and similar dp graphs greedy implementation trees Statement D Codeforces Round 660 (Div. 2) {1388} PROGRAMMING 2000.0 Codeforces Round #660 Editorial 2000
20523 Good String brute force dp greedy implementation two pointers Statement C Educational Codeforces Round 92 (Rated for Div. 2) {1389} PROGRAMMING 80809
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
5180 Pokémon Army (hard version) data structures divide and conquer dp greedy implementation Statement C2 Codeforces Round 672 (Div. 2) {1420} PROGRAMMING 1250.0
851 Minlexes dp greedy implementation strings Statement E Codeforces Round 675 (Div. 2) {1422} PROGRAMMING 2000.0 Codeforces Round #675 (Div. 2) Editorial
17267 String Equality dp greedy hashing implementation strings Statement C Codeforces Round 685 (Div. 2) {1451} PROGRAMMING 1250.0 Editorial — Codeforces Round #685
11655 Building a Fence dp greedy implementation two pointers Statement C Educational Codeforces Round 101 (Rated for Div. 2) {1469} PROGRAMMING Educational Codeforces Round 101 Editorial
4297 Cleaning data structures dp greedy implementation Statement D Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 2000.0 Codeforces Round #696 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
8386 Pekora and Trampoline brute force data structures dp graphs greedy implementation Statement C Codeforces Global Round 13 {1491} PROGRAMMING 1000.0 Codeforces Global Round 13 Editorial
21983 Binary Removals brute force dp greedy implementation Statement B Educational Codeforces Round 106 (Rated for Div. 2) {1499} PROGRAMMING Educational Codeforces Round 106 Editorial
2289 Nastia Plays with a Tree constructive algorithms data structures dfs and similar dp flows graphs greedy implementation trees Statement D Codeforces Round 720 (Div. 2) {1521} PROGRAMMING 2250.0 90477
17702 Unstable String dp greedy implementation strings two pointers Statement C Educational Codeforces Round 110 (Rated for Div. 2) {1535} PROGRAMMING 91481
11639 Ticks brute force dp greedy implementation Statement C Codeforces Round 744 (Div. 3) {1579} PROGRAMMING Codeforces Round #744 (Div. 3) Editorial
3917 Portal brute force dp greedy implementation Statement A Codeforces Round 745 (Div. 1) {1580} PROGRAMMING 500.0 Codeforces Round #745 Editorial 1700
7262 BA-String bitmasks brute force dp greedy implementation math shortest paths Statement C Educational Codeforces Round 119 (Rated for Div. 2) {1620} PROGRAMMING 98061
11794 Monsters And Spells data structures dp fft greedy implementation two pointers Statement C Educational Codeforces Round 121 (Rated for Div. 2) {1626} PROGRAMMING 99136
14952 Line Empire dp greedy implementation math Statement C Codeforces Round 782 (Div. 2) {1659} PROGRAMMING 1500.0 Codeforces Round #782 (Div. 2) Editorial
1793 MinimizOR binary search bitmasks data structures dp greedy implementation Statement E Codeforces Round 781 (Div. 2) {1665} PROGRAMMING 2250.0 Codeforces Round #781 (Div. 2) Editorial
15770 awoo's Favorite Problem constructive algorithms data structures dp greedy implementation strings two pointers Statement C Educational Codeforces Round 130 (Rated for Div. 2) {1697} PROGRAMMING 103835
16122 Qpwoeirut And The City dp greedy implementation Statement C Codeforces Round 809 (Div. 2) {1706} PROGRAMMING 1250.0 Codeforces Round #809 Editorial
12951 Zero-Sum Prefixes brute force data structures dp greedy implementation Statement C Codeforces Round 833 (Div. 2) {1748} PROGRAMMING 1500.0 Codeforces Round #833 (Div. 2) Editorial 1600
993 Serval and Brain Power brute force dp dp greedy implementation Statement F Codeforces Round 853 (Div. 2) {1789} PROGRAMMING 2750.0 Codeforces Round #853 (Div. 2) Editorial
7116 Moscow Gorillas dp greedy implementation two pointers Statement D Codeforces Round 852 (Div. 2) {1793} PROGRAMMING 1750.0 Codeforces Round #852 Editorial
1399 City Union constructive algorithms dp geometry greedy implementation math Statement E Codeforces Round 854 by cybercats (Div. 1 + Div. 2) {1799} PROGRAMMING 2250.0 Codeforces Round #854 Editorial
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
6364 Ksyusha and Chinchilla dfs and similar dp dsu greedy implementation trees Statement G Codeforces Round 874 (Div. 3) {1833} PROGRAMMING 116636
8991 Rating System brute force data structures dp greedy implementation math Statement D Educational Codeforces Round 151 (Rated for Div. 2) {1845} PROGRAMMING 117791
2739 Candy Party (Hard Version) bitmasks constructive algorithms dp graphs greedy implementation math Statement B2 Codeforces Round 896 (Div. 1) {1868} PROGRAMMING 750.0 Codeforces Round 896 (Div. 1, Div. 2) Editorial
9594 Bicycles dp graphs greedy implementation shortest paths sortings Statement G Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
34985 Unnatural Language Processing dp greedy implementation strings Statement D Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
6142 Blocking Elements binary search data structures dp greedy implementation two pointers Statement D Codeforces Round 922 (Div. 2) {1918} PROGRAMMING 2000.0 Codeforces Round #922 (Div. 2) Editorial
16586 XOR-distance bitmasks dp greedy implementation math Statement C Codeforces Round 922 (Div. 2) {1918} PROGRAMMING 1250.0 Codeforces Round #922 (Div. 2) Editorial
19836 Monsters Attack! dp greedy implementation Statement B Educational Codeforces Round 162 (Rated for Div. 2) {1923} PROGRAMMING Educational Codeforces Round 162 Editorial
4506 Vlad and Trouble at MIT dfs and similar dp flows graphs greedy implementation trees Statement G Codeforces Round 928 (Div. 4) {1926} PROGRAMMING 126132
2088 Modular Sequence constructive algorithms dp greedy implementation math number theory Statement E Codeforces Round 924 (Div. 2) {1928} PROGRAMMING 2250.0 Codeforces Round 924 Editorial
33801 Thorns and Coins dp greedy implementation Statement A Codeforces Round 927 (Div. 3) {1932} PROGRAMMING 126196
13674 Tree Cutting binary search dp greedy implementation trees Statement C Codeforces Round 936 (Div. 2) {1946} PROGRAMMING 1500.0 Codeforces Round #936 (Div. 2) Editorial
26234 Array Fix brute force dp greedy implementation Statement B Educational Codeforces Round 163 (Rated for Div. 2) {1948} PROGRAMMING Educational Codeforces Round 163 Editorial
4753 Nene and the Mex Operator bitmasks brute force constructive algorithms divide and conquer dp greedy implementation Statement D Codeforces Round 939 (Div. 2) {1956} PROGRAMMING 1750.0 [Editorial] Codeforces Round 939 (Div. 2)
400 Card Pairing dp greedy hashing implementation Statement F Educational Codeforces Round 165 (Rated for Div. 2) {1969} PROGRAMMING Educational Codeforces Round 165 Editorial 3000
30478 Binary Cut dp greedy implementation sortings strings Statement D Codeforces Round 944 (Div. 4) {1971} PROGRAMMING Codeforces Round 944 (Div. 4) Editorial 1100
12385 Job Interview binary search dp greedy implementation two pointers Statement C Educational Codeforces Round 166 (Rated for Div. 2) {1976} PROGRAMMING Educational Codeforces Round 166 Editorial
4593 Computing Machine data structures dp greedy implementation Statement E Codeforces Round 953 (Div. 2) {1978} PROGRAMMING 2000.0 130527
14682 Have Your Cake and Eat It Too binary search brute force dp greedy implementation Statement C Codeforces Round 956 (Div. 2) and ByteRace 2024 {1983} PROGRAMMING 1250.0
23931 Test of Love dp greedy implementation Statement D Codeforces Round 957 (Div. 3) {1992} PROGRAMMING Shayan's Video Tutorial
6906 Color Rows and Columns dp greedy implementation math Statement F Codeforces Round 966 (Div. 3) {2000} PROGRAMMING 132689
4627 Turtle and a MEX Problem (Hard Version) dfs and similar dp graphs greedy implementation Statement D2 Codeforces Round 968 (Div. 2) {2003} PROGRAMMING 1250.0 sol-zh.pdf
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)
5161 Speedbreaker binary search dp greedy implementation math two pointers Statement B Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
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)
2182 Max Plus Min Plus Size data structures dp dsu greedy implementation matrices Statement D Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 1500.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
1897 The Endspeaker (Hard Version) binary search combinatorics data structures dp greedy implementation two pointers Statement D2 Codeforces Round 982 (Div. 2) {2027} PROGRAMMING 1000.0 Codeforces Round #982 (Div. 2) Editorial
6929 The Endspeaker (Easy Version) binary search dp graphs greedy implementation two pointers Statement D1 Codeforces Round 982 (Div. 2) {2027} PROGRAMMING 1250.0 Codeforces Round #982 (Div. 2) Editorial
3724 Alice's Adventures in Cards constructive algorithms data structures dfs and similar dp graphs greedy implementation shortest paths Statement D Codeforces Round 986 (Div. 2) {2028} PROGRAMMING 1750.0 Codeforces Round 986 (Div. 2) Editorial
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
946 Earnest Matrix Complement data structures dp greedy implementation Statement F Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 2500.0 Good Bye 2024: 2025 is NEAR Editorial
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
698 And Constraint bitmasks dp greedy implementation Statement E Codeforces Round 1035 (Div. 2) {2119} PROGRAMMING 2500.0 Codeforces Round 1035 (Div. 2) Editorial
9658 Rabbits 2-sat dp graphs greedy implementation Statement C Codeforces Global Round 29 (Div. 1 + Div. 2) {2147} PROGRAMMING 1500.0
2752 Locked Out binary search data structures dp graphs greedy implementation two pointers Statement D Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 2250.0
11420 Rae Taylor and Trees (easy version) binary search data structures dp dsu greedy implementation trees Statement D Codeforces Round 1065 (Div. 3) {2171} PROGRAMMING Codeforces Round 1065 (Div. 3) Editorial
15540 First or Second dp greedy implementation Statement C Good Bye 2025 {2178} PROGRAMMING 1250.0
4713 Simons and Beating Peaks data structures divide and conquer dp greedy implementation trees Statement D Codeforces Round 1083 (Div. 2) {2205} PROGRAMMING 1750.0 Tutorial
78 EXPloration, EXPloitation, and Gain Some EXPerience! bitmasks brute force dp greedy implementation Statement D Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals) {2215} PROGRAMMING 2750.0