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

< 1 2

Solved
Name
Tags
Solutions
Index
Contest
Type
Points
Tutorial
Rating Level
2929 Multi-Colored Segments binary search data structures math sortings Statement F Codeforces Round 826 (Div. 3) {1741} PROGRAMMING 107908
45894 Traffic Light binary search implementation two pointers Statement C Codeforces Round 828 (Div. 3) {1744} PROGRAMMING Codeforces Round #828 (Div. 3) Editorial
253 Doremy's Paint 2 data structures Statement H Codeforces Global Round 24 {1764} PROGRAMMING 3500.0 Codeforces Global Round 24 Editorial
1262 Algebra Flash bitmasks brute force dp graphs meet-in-the-middle trees Statement E Educational Codeforces Round 140 (Rated for Div. 2) {1767} PROGRAMMING 110225
807 Hossam and a Letter brute force dp implementation two pointers Statement E Codeforces Round 837 (Div. 2) {1771} PROGRAMMING 2750.0 Codeforces Round #837 (Div. 2) Editorial
14062 Coloring constructive algorithms greedy Statement B Polynomial Round 2022 (Div. 1 + Div. 2, Rated, Prizes!) {1774} PROGRAMMING 1000.0 Polynomial Round 2022 (Div. 1 + Div. 2) Editorial
1566 Vittorio Plays with LEGO Bricks dp Statement B SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1776} PROGRAMMING
12243 Alternating Deck (hard version) implementation Statement A2 Codeforces Round 850 (Div. 2, based on VK Cup 2022 - Final Round) {1786} PROGRAMMING 500.0 Codeforces Round #850 Editorial
507 Graph Coloring (hard version) brute force fft Statement F2 Educational Codeforces Round 142 (Rated for Div. 2) {1792} PROGRAMMING 111835
995 Graph Coloring (easy version) dp Statement F1 Educational Codeforces Round 142 (Rated for Div. 2) {1792} PROGRAMMING 111835
24716 Two Towers brute force implementation strings Statement A Educational Codeforces Round 143 (Rated for Div. 2) {1795} PROGRAMMING 112963
13456 Triangle Coloring combinatorics math Statement D Educational Codeforces Round 143 (Rated for Div. 2) {1795} PROGRAMMING 112963
1039 Colored Subgraphs data structures dp greedy trees Statement E Educational Codeforces Round 144 (Rated for Div. 2) {1796} PROGRAMMING Educational Codeforces Round 144 Editorial
9840 The Very Beautiful Blanket bitmasks constructive algorithms Statement A Codeforces Round 857 (Div. 1) {1801} PROGRAMMING 500.0 Codeforces Round #857 Editorial
25242 Garland implementation Statement A Educational Codeforces Round 145 (Rated for Div. 2) {1809} PROGRAMMING 114300
2156 Vlad and the Nice Paths (hard version) binary search combinatorics data structures dp math two pointers Statement G2 Codeforces Round 863 (Div. 3) {1811} PROGRAMMING 114788
2534 Vlad and the Nice Paths (easy version) combinatorics dp math Statement G1 Codeforces Round 863 (Div. 3) {1811} PROGRAMMING 114788
946 Mex Tree brute force dp trees Statement D Codeforces Round 875 (Div. 1) {1830} PROGRAMMING 2250.0 Codeforces Round #875 (Div.1 + Div. 2) Editorial
22719 Bracket Coloring constructive algorithms data structures greedy Statement D Educational Codeforces Round 149 (Rated for Div. 2) {1837} PROGRAMMING 116752
2720 Ball Sorting data structures dp sortings Statement D Codeforces Round 876 (Div. 2) {1839} PROGRAMMING 2250.0 Codeforces Round #876 (Div. 2) Editorial
37507 Sasha and Array Coloring greedy sortings Statement A Codeforces Round 881 (Div. 3) {1843} PROGRAMMING Codeforces Round #881 (Div. 3) Editorial
25447 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
82032 Array Coloring greedy math Statement A Codeforces Round 891 (Div. 3) {1857} PROGRAMMING 119134
10844 Two-Colored Dominoes constructive algorithms greedy Statement D Pinely Round 2 (Div. 1 + Div. 2) {1863} PROGRAMMING 1250.0
13193 Colorful Table binary search data structures dp implementation math sortings two pointers Statement C CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) {1870} PROGRAMMING 1500.0 CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
1586 Interactive Game with Coloring brute force constructive algorithms graphs implementation interactive math trees Statement E Educational Codeforces Round 155 (Rated for Div. 2) {1879} PROGRAMMING 120773 2400
511 Good Colorings binary search constructive algorithms graphs interactive Statement E Codeforces Round 905 (Div. 1) {1887} PROGRAMMING 2000.0 Codeforces Round #905 (Div. 1, Div. 2, Div. 3) Editorial
1094 Colorful Constructive constructive algorithms greedy math Statement D Codeforces Round 908 (Div. 1) {1893} PROGRAMMING 2250.0 Codeforces Round 908 (Div. 1, Div, 2) Editorial
368 Two Characters, Two Colors binary search data structures dp flows geometry Statement G Educational Codeforces Round 157 (Rated for Div. 2) {1895} PROGRAMMING Educational Codeforces Round 157 Editorial
57 Two Colors *special Statement J Kotlin Heroes: Episode 9 (Unrated, T-Shirts + Prizes!) {1910} PROGRAMMING 123261
14354 Game with Marbles (Easy Version) brute force games greedy sortings Statement E1 Codeforces Round 916 (Div. 3) {1914} PROGRAMMING Codeforces Round 916 (Div. 3) Editorial
14877 Game with Marbles (Hard Version) games greedy sortings Statement E2 Codeforces Round 916 (Div. 3) {1914} PROGRAMMING Codeforces Round 916 (Div. 3) Editorial
2645 Tree Compass constructive algorithms dfs and similar greedy trees Statement C Codeforces Round 934 (Div. 1) {1943} PROGRAMMING 1250.0 Codeforces Round #934 (Div1, Div2) Editorial
8233 Colored Balls combinatorics dp greedy math sortings Statement D Educational Codeforces Round 164 (Rated for Div. 2) {1954} PROGRAMMING Educational Codeforces Round 164 Editorial
27816 Painting the Ribbon math Statement A Educational Codeforces Round 164 (Rated for Div. 2) {1954} PROGRAMMING Educational Codeforces Round 164 Editorial
469 Connected Cubes constructive algorithms games Statement E Codeforces Round 941 (Div. 1) {1965} PROGRAMMING 2500.0 Codeforces Round #941 (Div. 1, Div. 2) Editorial 3100
17349 Rectangle Filling constructive algorithms implementation Statement B Codeforces Round 941 (Div. 2) {1966} PROGRAMMING 1000.0 Codeforces Round #941 (Div. 1, Div. 2) Editorial 1100
2798 ±1 2-sat dfs and similar graphs Statement H Codeforces Round 944 (Div. 4) {1971} PROGRAMMING Codeforces Round 944 (Div. 4) Editorial 2100
606 Simultaneous Coloring dfs and similar divide and conquer graphs Statement F Educational Codeforces Round 167 (Rated for Div. 2) {1989} PROGRAMMING Educational Codeforces Round 167 Editorial
7949 Prime XOR Coloring bitmasks constructive algorithms graphs greedy math number theory Statement D Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 1500.0 Video Tutorial
5183 Coloring Game constructive algorithms games graphs greedy interactive Statement E Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 2000.0 Video Tutorial
21386 Distanced Coloring constructive algorithms implementation math Statement A EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) {2002} PROGRAMMING 500.0 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial
13420 Colored Portals binary search data structures graphs greedy shortest paths Statement D Educational Codeforces Round 169 (Rated for Div. 2) {2004} PROGRAMMING Educational Codeforces Round 169 Editorial
171 Dora's Paint brute force combinatorics constructive algorithms graphs Statement F Codeforces Round 969 (Div. 1) {2006} PROGRAMMING 3000.0 Tutorial
79 Simurgh's Watch (Easy Version) greedy implementation Statement G1 Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 3000.0 Rayan 2024 Selection Round Editorial
83 Simurgh's Watch (Hard Version) greedy implementation Statement G2 Rayan Programming Contest 2024 - Selection (Codeforces Round 989, Div. 1 + Div. 2) {2034} PROGRAMMING 3000.0 Rayan 2024 Selection Round Editorial
1708 Library of Magic binary search bitmasks constructive algorithms interactive Statement G Codeforces Round 984 (Div. 3) {2036} PROGRAMMING Codeforces Round 984 (Div. 3) Editorial
466 Number of Cubes combinatorics math number theory Statement F Codeforces Round 992 (Div. 2) {2040} PROGRAMMING 2750.0 Codeforces Round #992 (Div.2) Editorial
67 Grid Game Statement G 2024 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2041} PROGRAMMING Problem Analysis and Hints (PDF)
7295 Bowling Frame binary search math Statement B 2024 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2041} PROGRAMMING Problem Analysis and Hints (PDF)
19648 Game with Colored Marbles games greedy Statement B Educational Codeforces Round 172 (Rated for Div. 2) {2042} PROGRAMMING 136886
18988 Set of Strangers greedy matrices Statement B Educational Codeforces Round 174 (Rated for Div. 2) {2069} PROGRAMMING 139774
14622 Two Colors binary search data structures dp math Statement C Educational Codeforces Round 176 (Rated for Div. 2) {2075} PROGRAMMING Educational Codeforces Round 176 Editorial
3885 She knows... combinatorics constructive algorithms graphs math Statement E Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 2250.0 Codeforces Round #1014 (Div. 2) Editorial
2078 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
16732 Wonderful Gloves greedy math sortings Statement B Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) {2096} PROGRAMMING 750.0 Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) Editorial
546 Modulo 3 data structures divide and conquer dsu trees Statement G Educational Codeforces Round 178 (Rated for Div. 2) {2104} PROGRAMMING Educational Codeforces Round 178 Editorial
909 Spruce Dispute constructive algorithms dfs and similar graphs implementation shortest paths trees Statement E Codeforces Round 1022 (Div. 2) {2108} PROGRAMMING 2750.0 Codeforces Round 1022 Editorial
18007 Coloring Game binary search brute force greedy two pointers Statement C Educational Codeforces Round 180 (Rated for Div. 2) {2112} PROGRAMMING Educational Codeforces Round 180 — Editorial
4377 1-1-1, Free Tree! data structures dfs and similar graphs trees Statement F Codeforces Round 1037 (Div. 3) {2126} PROGRAMMING 144845
3134 Ancient Tree constructive algorithms data structures dfs and similar dsu greedy trees Statement E Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 2500.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
27096 Painting With Two Colors constructive algorithms implementation math Statement A Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 500.0 145832
6697 Inversion Graph Coloring (Easy Version) binary search data structures dp two pointers Statement D1 Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 1750.0 Codeforces Round 1051 (Div. 2) Editorial
2938 Inversion Graph Coloring (Hard Version) binary search data structures dp two pointers Statement D2 Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 1000.0 Codeforces Round 1051 (Div. 2) Editorial
629 Cost of Coloring combinatorics fft math Statement G Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
253 Maxflow GCD Coloring flows graphs Statement H Codeforces Global Round 29 (Div. 1 + Div. 2) {2147} PROGRAMMING 5500.0
12366 Incremental Path data structures implementation Statement A Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 500.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
209 Victorious Coloring (Hard Version) data structures data structures data structures data structures Statement H2 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 2500.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
1010 Victorious Coloring (Easy Version) dp graphs Statement H1 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) {2152} PROGRAMMING 4000.0 Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial
722 Juan's Colorful Tree data structures data structures dfs and similar dfs and similar dsu graphs graphs trees Statement F Codeforces Round 1056 (Div. 2) {2155} PROGRAMMING 3000.0 Codeforces Round 1056 (Div. 2) Editorial
326 Rainbow Branch dp trees Statement E Codeforces Round 1064 (Div. 1) {2165} PROGRAMMING 3000.0 148452
493 Mosaic Tree combinatorics dp fft math trees Statement F Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 3500.0 Codeforces Round 1069 Editorial
1213 Beautiful Patterns (Easy Version) math probabilities Statement C1 Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 1500.0 Codeforces Round 1069 Editorial
1066 Beautiful Patterns (Hard Version) math probabilities Statement C2 Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 500.0 Codeforces Round 1069 Editorial
19127 Little Fairy's Painting implementation Statement A Codeforces Round 1069 (Div. 2) {2175} PROGRAMMING 500.0 Codeforces Round 1069 Editorial
2835 Blackslex and Another RGB Walking graphs interactive number theory Statement F Codeforces Round 1071 (Div. 3) {2179} PROGRAMMING Codeforces Round 1071 (Div. 3) Editorial
87 Knit the Grid Statement K 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
28376 Array Coloring constructive algorithms Statement A Codeforces Round 1073 (Div. 2) {2191} PROGRAMMING 500.0 Codeforces Round 1073 (Div. 1, Div. 2) Editorial
299 Hanabi data structures dp flows graph matchings graphs greedy Statement F Codeforces Round 1085 (Div. 1 + Div. 2) {2207} PROGRAMMING 3250.0 Codeforces Round 1085 (Div. 1 + Div. 2) Editorial
5705 Ghostfires constructive algorithms greedy Statement D Codeforces Round 1087 (Div. 2) {2209} PROGRAMMING 1750.0 Codeforces Round 1087 (Div. 2) Editorial
91 Zhily and Colorful Strings divide and conquer fft math Statement F Codeforces Round 1097 (Div. 1, Based on Zhili Cup 2026) {2223} PROGRAMMING 4500.0 Codeforces Round 1097 (Div. 1, Div2, Based on Zhili Cup 2026) Tutorial
13303 Red-Black Pairs dp greedy Statement C Educational Codeforces Round 189 (Rated for Div. 2) {2225} PROGRAMMING Tutorial