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
5343 Hometask brute force constructive algorithms greedy math Statement B Codeforces Round 131 (Div. 2) {214} PROGRAMMING Codeforces Round #131 Tutorial 1600
2823 Beauty Pageant brute force constructive algorithms greedy Statement C Codeforces Round 151 (Div. 2) {246} PROGRAMMING Codeforces Round #151 (Div. 2) Tutorial 1600
703 Broken Monitor brute force constructive algorithms greedy implementation Statement D Codeforces Round 217 (Div. 2) {370} PROGRAMMING Codeforces Round #217 (Div. 2): tutorial 2100
827 Kamal-ol-molk's Painting brute force constructive algorithms greedy Statement C Bayan 2015 Contest Warm Up {475} PROGRAMMING Bayan 2015 Contest Warm Up Editorial 2100
8420 Towers brute force constructive algorithms greedy implementation sortings Statement B Codeforces Round 274 (Div. 2) {479} PROGRAMMING Codeforces Round #274: editorial 1400
18604 Holidays brute force constructive algorithms greedy math Statement A Codeforces Round 350 (Div. 2) {670} PROGRAMMING Codeforces Round #350 (Div.2) Editorial 1000
4196 Dasha and Very Difficult Problem binary search brute force constructive algorithms greedy sortings Statement D Codeforces Round 394 (Div. 2) {761} PROGRAMMING Codeforces Round #394 (Div. 2) [Editorial] 1700
6625 Relatively Prime Graph brute force constructive algorithms graphs greedy math Statement D Educational Codeforces Round 47 (Rated for Div. 2) {1009} PROGRAMMING 60630 1700
11005 New Year and the Treasure Geolocation brute force constructive algorithms greedy implementation Statement B Good Bye 2018 {1091} PROGRAMMING Editorial 1200
1796 Nice table brute force constructive algorithms greedy math Statement B Codeforces Round 530 (Div. 1) {1098} PROGRAMMING 64331 2300
4502 Archaeology brute force constructive algorithms greedy strings Statement E Codeforces Global Round 4 {1178} PROGRAMMING E 1900
2798 The Feast and the Bus brute force constructive algorithms greedy math Statement B 2019-2020 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) {1250} PROGRAMMING 1900
6044 Beautiful Sequence brute force constructive algorithms greedy Statement B Codeforces Round 604 (Div. 1) {1264} PROGRAMMING 71995 1900
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
6759 Aroma's Search brute force constructive algorithms geometry greedy implementation Statement B Codeforces Round 614 (Div. 1) {1292} PROGRAMMING 750.0 Codeforces Round #614 Editorial 1800
18743 Longest Palindrome brute force constructive algorithms greedy implementation strings Statement B Codeforces Round 620 (Div. 2) {1304} PROGRAMMING 1000.0 Codeforces Round #620 (Div. 2) Editorial 1100
14639 Kuroni and the Gifts brute force constructive algorithms greedy sortings Statement A Ozon Tech Challenge 2020 (Div.1 + Div.2, Rated, T-shirts + prizes!) {1305} PROGRAMMING 500.0 Ozon Tech Challenge 2020 Editorial 800
18917 Composite Coloring brute force constructive algorithms greedy math number theory Statement B Codeforces Round 630 (Div. 2) {1332} PROGRAMMING 1000.0 Codeforces Round #630 Editorial 1500
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
17883 Circle of Monsters brute force constructive algorithms greedy math Statement C Educational Codeforces Round 85 (Rated for Div. 2) {1334} PROGRAMMING Educational Codeforces Round 85 Editorial
3436 Perfect Triples bitmasks brute force constructive algorithms divide and conquer greedy implementation math Statement C Codeforces Round 633 (Div. 1) {1338} PROGRAMMING 1500.0 Editorial
1392 Restore the Permutation by Sorted Segments brute force constructive algorithms data structures greedy implementation Statement F Codeforces Round 636 (Div. 3) {1343} PROGRAMMING 76352 2800
14323 Ehab and Prefix MEXs brute force constructive algorithms greedy Statement C Codeforces Round 649 (Div. 2) {1364} PROGRAMMING 1500.0 Codeforces round #649 editorial 1600
21315 Codeforces Subsequences brute force constructive algorithms greedy math strings Statement B Codeforces Global Round 8 {1368} PROGRAMMING 1000.0 Codeforces Global Round 8: editorial
5714 Omkar and Circle brute force constructive algorithms dp games greedy Statement D Codeforces Round 655 (Div. 2) {1372} PROGRAMMING 2000.0 Codeforces Round #655 Editorial 2100
2946 Sum of Digits brute force constructive algorithms dp greedy math number theory Statement E Educational Codeforces Round 90 (Rated for Div. 2) {1373} PROGRAMMING Educational Codeforces Round 90 Editorial
759 Rearrange brute force constructive algorithms graphs greedy sortings Statement D Codeforces Round 659 (Div. 1) {1383} PROGRAMMING 1750.0 Codeforces Round #659 Editorial
12891 Stoned Game brute force constructive algorithms games greedy Statement B Codeforces Round 666 (Div. 1) {1396} PROGRAMMING 1000.0 Codeforces Round #666 — Editorial
16949 Stairs brute force constructive algorithms greedy implementation math two pointers Statement B Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 750.0 Codeforces Round #671 Editorial
8116 Rock, Paper, Scissors brute force constructive algorithms flows greedy math Statement E Codeforces Round 674 (Div. 3) {1426} PROGRAMMING 83120 1800
18454 Marketing Scheme brute force constructive algorithms greedy math Statement A Educational Codeforces Round 97 (Rated for Div. 2) {1437} PROGRAMMING 84149
4434 Checkpoints brute force constructive algorithms greedy math probabilities Statement D Codeforces Round 688 (Div. 2) {1453} PROGRAMMING 2000.0 Codeforces Round #688 (Div. 2) Editorial
1643 Four Points brute force constructive algorithms flows geometry greedy math ternary search Statement E Educational Codeforces Round 99 (Rated for Div. 2) {1455} PROGRAMMING 85186
6780 Three Bags brute force constructive algorithms greedy Statement C Codeforces Round 695 (Div. 2) {1467} PROGRAMMING 1500.0 Codeforces Round #695 (Div. 2) Editorial 1900
12390 Fence Painting brute force constructive algorithms greedy implementation Statement C Codeforces Round 699 (Div. 2) {1481} PROGRAMMING 1500.0 Codeforces Round #699 (Div. 2) Editorial
15386 Minimum Ties brute force constructive algorithms dfs and similar graphs greedy implementation math Statement C Educational Codeforces Round 104 (Rated for Div. 2) {1487} PROGRAMMING 87873
1288 Almost Fault-Tolerant Database brute force constructive algorithms dfs and similar greedy implementation Statement E Codeforces Round 704 (Div. 2) {1492} PROGRAMMING 3000.0 Codeforces Round #704 Editorial
2814 Dogeforces brute force constructive algorithms divide and conquer dsu greedy implementation trees Statement D Educational Codeforces Round 105 (Rated for Div. 2) {1494} PROGRAMMING Educational Codeforces Round 105 Editorial
22231 Split it! brute force constructive algorithms greedy strings Statement A Codeforces Round 706 (Div. 2) {1496} PROGRAMMING 500.0 Codeforces Round #706 Editorial
12429 Min Cost String brute force constructive algorithms dfs and similar graphs greedy Statement D Educational Codeforces Round 107 (Rated for Div. 2) {1511} PROGRAMMING 89634
15973 Mocha and Diana (Easy Version) brute force constructive algorithms dsu graphs greedy trees Statement D1 Codeforces Round 738 (Div. 2) {1559} PROGRAMMING 1500.0 Tutorial (en) 1400
3048 Mocha and Diana (Hard Version) brute force constructive algorithms dfs and similar dsu graphs greedy trees two pointers Statement D2 Codeforces Round 738 (Div. 2) {1559} PROGRAMMING 1500.0 Tutorial (en) 2500
6741 Nearest Beautiful Number (easy version) binary search bitmasks brute force constructive algorithms dfs and similar greedy Statement F1 Codeforces Round 739 (Div. 3) {1560} PROGRAMMING 94009 1900
4928 Nearest Beautiful Number (hard version) bitmasks brute force constructive algorithms dfs and similar dp greedy Statement F2 Codeforces Round 739 (Div. 3) {1560} PROGRAMMING 94009 2100
2004 Xor of 3 brute force constructive algorithms greedy Statement B Codeforces Round 743 (Div. 1) {1572} PROGRAMMING 1250.0 Tutorial 2500
24567 Divan and a Store brute force constructive algorithms greedy Statement A Codeforces Round 757 (Div. 2) {1614} PROGRAMMING 500.0 Tutorial 800
4795 Exact Change binary search brute force constructive algorithms greedy Statement D Educational Codeforces Round 119 (Rated for Div. 2) {1620} PROGRAMMING 98061
16954 Meximum Array brute force constructive algorithms greedy math Statement A Codeforces Round 767 (Div. 1) {1628} PROGRAMMING 500.0 99276
22654 Quality vs Quantity brute force constructive algorithms greedy sortings two pointers Statement B Codeforces Round 774 (Div. 2) {1646} PROGRAMMING 1000.0 Codeforces Round #774 (Div. 2) Editorial 800
8437 Insert a Progression brute force constructive algorithms greedy Statement D Educational Codeforces Round 127 (Rated for Div. 2) {1671} PROGRAMMING 102181
7281 Breaking the Wall binary search brute force constructive algorithms greedy math Statement E Codeforces Round 786 (Div. 3) {1674} PROGRAMMING 102482
3619 MEX vs DIFF brute force constructive algorithms data structures greedy two pointers Statement E Codeforces Round 792 (Div. 1 + Div. 2) {1684} PROGRAMMING 1750.0 Codeforces Round #792 (Div. 1 + Div. 2) Editorial 2100
17193 Sum of Substrings brute force constructive algorithms greedy math strings Statement C CodeCraft-22 and Codeforces Round 795 (Div. 2) {1691} PROGRAMMING 1250.0 Editorial for CodeCraft-22 and Codeforces Round #795 (Div. 2)
1782 PermutationForces II binary search brute force combinatorics constructive algorithms greedy sortings Statement E Codeforces Round 803 (Div. 2) {1698} PROGRAMMING 2000.0 Codeforces Round #803 (Div. 2) Editorial
7706 Chopping Carrots (Easy Version) binary search brute force constructive algorithms dp greedy number theory Statement D1 Codeforces Round 809 (Div. 2) {1706} PROGRAMMING 1000.0 Codeforces Round #809 Editorial
3656 Build a Tree and That Is It brute force constructive algorithms greedy implementation trees Statement F Codeforces Round 811 (Div. 3) {1714} PROGRAMMING Codeforces Round #811 (Div. 3) Editorial
10240 SlavicG's Favorite Problem bitmasks brute force constructive algorithms data structures dfs and similar graphs greedy Statement G Codeforces Round 835 (Div. 4) {1760} PROGRAMMING 109348
7773 Another Array Problem brute force constructive algorithms greedy Statement C Codeforces Round 840 (Div. 2) and Enigma 2022 - Cybros LNMIIT {1763} PROGRAMMING 1500.0 Codeforces Round #840 (Div. 2) and Enigma 2022 — Cybros LNMIIT Editorial
8903 Li Hua and Chess brute force constructive algorithms greedy hashing interactive Statement C Codeforces Round 864 (Div. 2) {1797} PROGRAMMING 1500.0 Codeforces Round 864 (Div. 2) Editorial
12711 Equalize by Divide brute force constructive algorithms greedy math Statement B Codeforces Round 854 by cybercats (Div. 1 + Div. 2) {1799} PROGRAMMING 1000.0 Codeforces Round #854 Editorial
15223 Unforgivable Curse (hard version) brute force constructive algorithms constructive algorithms dsu graphs greedy Statement E2 Codeforces Round 855 (Div. 3) {1800} PROGRAMMING Codeforces Round 855 (Div. 3) Editorial
15542 Unforgivable Curse (easy version) brute force constructive algorithms dsu graphs greedy Statement E1 Codeforces Round 855 (Div. 3) {1800} PROGRAMMING Codeforces Round 855 (Div. 3) Editorial
4715 Tenzing and His Animal Friends brute force constructive algorithms graphs greedy shortest paths Statement D CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) {1842} PROGRAMMING 1500.0 CodeTON Round 5 Editorial
10281 Array Painting brute force constructive algorithms dp greedy Statement D Educational Codeforces Round 152 (Rated for Div. 2) {1849} PROGRAMMING 118752
3185 Trees and Segments binary search brute force constructive algorithms data structures dp greedy two pointers Statement D Codeforces Round 893 (Div. 2) {1858} PROGRAMMING 2000.0 Codeforces Round #893 (Div. 2) Editorial 2200
7614 Matrix Cascade brute force constructive algorithms dp greedy Statement D Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) {1864} PROGRAMMING 1500.0 Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) Editorial
508 Most Different Tree brute force constructive algorithms dfs and similar greedy hashing Statement F Codeforces Round 897 (Div. 2) {1867} PROGRAMMING 4000.0
17390 Sets and Union bitmasks brute force constructive algorithms greedy Statement B Codeforces Round 899 (Div. 2) {1882} PROGRAMMING 1000.0 Codeforces Round 899 (Div. 2) Editorial
1209 Two Permutations (Easy Version) brute force constructive algorithms greedy number theory Statement E1 Codeforces Round 899 (Div. 2) {1882} PROGRAMMING 2000.0 Codeforces Round 899 (Div. 2) Editorial
19131 Simple Design brute force constructive algorithms greedy math Statement A Codeforces Round 904 (Div. 2) {1884} PROGRAMMING 500.0 Codeforces Round #904 (Div. 2) Editorial
16915 Insert and Equalize brute force constructive algorithms greedy math number theory Statement C Educational Codeforces Round 159 (Rated for Div. 2) {1902} PROGRAMMING Educational Codeforces Round 159 Editorial
14805 StORage room bitmasks brute force constructive algorithms greedy Statement B Codeforces Round 912 (Div. 2) {1903} PROGRAMMING 1000.0 Codeforces Round #912 (Div. 2) Editorial
8586 Set To Max (Easy Version) brute force constructive algorithms greedy Statement D1 Codeforces Round 914 (Div. 2) {1904} PROGRAMMING 1250.0 Codeforces Round 914 (Div. 2) Editorial
5591 Birthday Gift bitmasks brute force constructive algorithms greedy implementation Statement D Codeforces Round 936 (Div. 2) {1946} PROGRAMMING 1750.0 Codeforces Round #936 (Div. 2) Editorial
4466 No Palindromes brute force constructive algorithms greedy hashing implementation strings Statement E Codeforces Global Round 25 {1951} PROGRAMMING 2250.0 Codeforces Global Round 25 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)
7833 Fixing a Binary String bitmasks brute force constructive algorithms greedy hashing strings Statement D Codeforces Round 951 (Div. 2) {1979} PROGRAMMING 2000.0 Codeforces Round 951 (Div. 2) Editorial
49058 Only Pluses brute force constructive algorithms greedy math sortings Statement A Codeforces Round 957 (Div. 3) {1992} PROGRAMMING Shayan's 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
6354 Longest Max Min Subsequence brute force constructive algorithms greedy two pointers Statement D Codeforces Round 967 (Div. 2) {2001} PROGRAMMING 2000.0 Video Tutorial
17655 Black Circles brute force constructive algorithms geometry greedy math Statement C EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) {2002} PROGRAMMING 1000.0 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial
637 Turtle and Inversions (Hard Version) brute force constructive algorithms data structures dp greedy two pointers Statement E2 Codeforces Round 968 (Div. 2) {2003} PROGRAMMING 1000.0 sol-zh.pdf
41681 Sakurako's Exam brute force constructive algorithms greedy math Statement A Codeforces Round 970 (Div. 3) {2008} PROGRAMMING Codeforces Round 970 (Div. 3) Editorial
1369 C+K+S brute force constructive algorithms dfs and similar graphs greedy hashing math strings Statement C Codeforces Round 980 (Div. 1) {2023} PROGRAMMING 1500.0 135341
3520 Common Generator brute force constructive algorithms greedy math number theory Statement E Refact.ai Match 1 (Codeforces Round 985) {2029} PROGRAMMING 2500.0 Refact.ai Match 1 (Codeforces Round 985) Editorial
2015 Permutations Harmony brute force combinatorics constructive algorithms greedy hashing implementation math Statement E Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 2000.0 Rayan 2024 Selection Round Editorial
5833 Non Prime Tree brute force constructive algorithms dfs and similar greedy number theory trees two pointers Statement D Codeforces Round 992 (Div. 2) {2040} PROGRAMMING 2000.0 Codeforces Round #992 (Div.2) Editorial
12478 Customer Service brute force constructive algorithms graph matchings greedy math sortings Statement C Codeforces Round 1002 (Div. 2) {2059} PROGRAMMING 1500.0 139094
882 Stop Gaming (Easy Version) brute force constructive algorithms greedy hashing Statement E1 Codeforces Round 1002 (Div. 2) {2059} PROGRAMMING 1500.0 139094
18705 Cost of the Array brute force constructive algorithms greedy math Statement B Codeforces Round 1002 (Div. 2) {2059} PROGRAMMING 1000.0 139094
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
17669 Remove the Ends brute force constructive algorithms dp greedy Statement C Codeforces Round 1005 (Div. 2) {2064} PROGRAMMING 1250.0 Codeforces Round 1005 (Div. 2) Editorial
20785 Perfecto brute force constructive algorithms greedy math probabilities Statement B Codeforces Round 1007 (Div. 2) {2071} PROGRAMMING 1000.0 Codeforces Round 1007 (Div. 2) Editorial
8765 Arcology On Permafrost binary search brute force constructive algorithms greedy math Statement D Teza Round 1 (Codeforces Round 1015, Div. 1 + Div. 2) {2084} PROGRAMMING 1750.0 141155
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
6827 Mishkin Energizer brute force constructive algorithms greedy implementation strings Statement D Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 1750.0 Codeforces Round #1014 (Div. 2) Editorial
428 Andryusha and CCB brute force constructive algorithms greedy math number theory strings Statement F Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 3000.0 Codeforces Round #1014 (Div. 2) Editorial
1400 Puzzle brute force constructive algorithms greedy math Statement F Educational Codeforces Round 179 (Rated for Div. 2) {2111} PROGRAMMING Educational Codeforces Round 179 Editorial
7930 Smilo and Minecraft brute force constructive algorithms dp greedy Statement C Codeforces Round 1031 (Div. 2) {2113} PROGRAMMING 1250.0 Codeforces Round #1031 Editorial
14807 Gellyfish and Flaming Peony brute force constructive algorithms dp greedy math number theory shortest paths Statement A Codeforces Round 1028 (Div. 1) {2115} PROGRAMMING 500.0 Codeforces Round 1028 (Div.1, Div.2) Editorial
877 Sea, You & copriMe brute force combinatorics constructive algorithms graphs greedy math number theory Statement H Codeforces Round 1042 (Div. 3) {2131} PROGRAMMING Codeforces Round 1042 (Div. 3) Editorial
2027 Yet Another MEX Problem brute force constructive algorithms data structures greedy Statement E Codeforces Round 1052 (Div. 2) {2146} PROGRAMMING 2500.0 Codeforces Round 1052 (Div. 2) Editorial
26706 Pizza Time brute force constructive algorithms greedy Statement A Codeforces Round 1061 (Div. 2) {2156} PROGRAMMING 500.0 Codeforces Round 1061 (Div. 2) Editorial
402 Isaac's Queries brute force constructive algorithms dfs and similar divide and conquer greedy interactive math probabilities Statement G Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 3000.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
13965 Cyclic Merging brute force constructive algorithms graphs greedy trees Statement A Codeforces Round 1064 (Div. 1) {2165} PROGRAMMING 500.0 148452
137 Elevator Against Humanity brute force constructive algorithms greedy sortings Statement E 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial