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
459 Pentagon combinatorics graphs matrices Statement E Codeforces Beta Round 48 {51} PROGRAMMING 2300
1014 Ski Base combinatorics dsu graphs Statement C Codeforces Beta Round 75 (Div. 1 Only) {91} PROGRAMMING Analysis Codeforces Beta Round #75 2500
5358 Quantity of Strings combinatorics dfs and similar graphs math Statement B Codeforces Round 107 (Div. 1) {150} PROGRAMMING Tutorial 1800
2070 Clues combinatorics graphs Statement D Codeforces Round 110 (Div. 1) {156} PROGRAMMING Codeforces Round 110 — Разбор задач 2400
1783 Triangles combinatorics graphs math Statement C Codeforces Round 142 (Div. 1) {229} PROGRAMMING Codeforces Round #142 Problem Analysis 2100
1301 Dima and Horses combinatorics constructive algorithms graphs Statement E Codeforces Round 167 (Div. 2) {272} PROGRAMMING Codeforces Round #167 tutorial 2300
1943 Greg and Friends combinatorics dp graphs shortest paths Statement C Codeforces Round 179 (Div. 1) {295} PROGRAMMING Codeforces Round #179 tutorial 2500
959 The Red Button combinatorics dfs and similar dsu graphs greedy Statement E MemSQL start[c]up Round 1 {325} PROGRAMMING Editorial 2700
2760 Iahub and Permutations combinatorics math Statement E Codeforces Round 198 (Div. 2) {340} PROGRAMMING Tutorial 2200
7065 Unbearable Controversy of Being brute force combinatorics dfs and similar graphs Statement D Codeforces Round 277.5 (Div. 2) {489} PROGRAMMING Codeforces Round #277.5 (Div. 2) Editorial [A-D for now] 1700
3282 New Year Santa Network combinatorics dfs and similar graphs trees Statement D Good Bye 2014 {500} PROGRAMMING Tutorial 2 1900
2388 Vitaly and Cycle combinatorics dfs and similar graphs math Statement D Codeforces Round 311 (Div. 2) {557} PROGRAMMING Codeforces Round #311 (Div.2) Editorial 2300
2113 Pig and Palindromes combinatorics dp Statement E Codeforces Round 316 (Div. 2) {570} PROGRAMMING Codeforces Round #316 Editorial 2600
2016 Square Root of Permutation combinatorics constructive algorithms dfs and similar graphs math Statement E Educational Codeforces Round 4 {612} PROGRAMMING 22299 2200
5021 Directed Roads combinatorics dfs and similar graphs math Statement D Codeforces Round 369 (Div. 2) {711} PROGRAMMING 46830 1900
456 Complete the Permutations combinatorics fft graphs math Statement E Codeforces Round 372 (Div. 1) {715} PROGRAMMING Codeforces Round #372 Editorial 3400
480 Tree nesting combinatorics graphs trees Statement F Educational Codeforces Round 17 {762} PROGRAMMING Tutorial 2900
2900 Weird journey combinatorics constructive algorithms dfs and similar dsu graphs Statement B Codeforces Round 407 (Div. 1) {788} PROGRAMMING Codeforces Round #407(Div.1 + Div.2) Editorial 2200
215 Fake bullions combinatorics dfs and similar dp graphs number theory Statement F Codeforces Round 411 (Div. 1) {804} PROGRAMMING Codeforces Round #411 Editorial 3400
728 An unavoidable detour for home combinatorics dp graphs shortest paths Statement E Codeforces Round 418 (Div. 2) {814} PROGRAMMING Codeforces Round #418 (Div. 2) Editorial 2700
982 Singer House combinatorics dp graphs trees Statement D Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 2800
456 Shake It! combinatorics dp flows graphs Statement D Codeforces Round 431 (Div. 1) {848} PROGRAMMING Codeforces Round #431 Editorial 2900
2120 Desk Disorder combinatorics dfs and similar dsu graphs trees Statement E MemSQL Start[c]UP 3.0 - Round 1 {859} PROGRAMMING Tutorial 2100
517 Cycles in product combinatorics divide and conquer trees Statement D Codeforces Round 493 (Div. 1) {997} PROGRAMMING 60357 2800
1506 Sasha and Interesting Fact from Graph Theory brute force combinatorics dp math trees Statement D Codeforces Round 539 (Div. 1) {1109} PROGRAMMING Codeforces Round #539 Editorial 2600
5698 Two Fairs combinatorics dfs and similar dsu graphs Statement B Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4) {1276} PROGRAMMING Technocup 2020 — Elimination Round 4 + Codeforces Round 606: Editorial 1900
530 Around the World bitmasks combinatorics dfs and similar dp graphs graphs math trees Statement D Codeforces Round 618 (Div. 1) {1299} PROGRAMMING 1750.0 Codeforces Round #618 Editorial 2900
3186 Divisor Paths combinatorics graphs greedy math number theory Statement E Educational Codeforces Round 85 (Rated for Div. 2) {1334} PROGRAMMING Educational Codeforces Round 85 Editorial
16058 Cyclic Permutations combinatorics graphs math Statement C Codeforces Round 663 (Div. 2) {1391} PROGRAMMING 1250.0 Codeforces Round #663 (Div. 2) Editorial
236 Star Trek *special combinatorics dfs and similar dp games graphs matrices trees Statement C Central-European Olympiad in Informatics, CEOI 2020, Day 1 (IOI, Unofficial Mirror Contest, Unrated) {1402} PROGRAMMING Editorial
1342 Clusterization Counting combinatorics dp dsu fft graphs Statement G Grakn Forces 2020 {1408} PROGRAMMING 3000.0 Grakn Forces -- Editorial
6674 Number of Simple Paths combinatorics data structures dfs and similar dsu graphs trees Statement E Codeforces Round 686 (Div. 3) {1454} PROGRAMMING Codeforces Round #686 (Div. 3) Editorial
27511 Ball in Berland combinatorics dfs and similar graphs hashing math Statement C Codeforces Round 697 (Div. 3) {1475} PROGRAMMING Codeforces Round #697 (Div. 3) Editorial
1541 BFS Trees combinatorics dfs and similar graphs math shortest paths trees Statement D Codeforces Round 706 (Div. 1) {1495} PROGRAMMING 2000.0 Codeforces Round #706 Editorial
2144 Two Houses brute force combinatorics graphs interactive probabilities sortings Statement E CodeCraft-21 and Codeforces Round 711 (Div. 2) {1498} PROGRAMMING 2500.0 CodeCraft-21 and Codeforces Round #711 (Div. 2) Editorial
13885 Little Alawn's Puzzle combinatorics dfs and similar dp dsu graphs math Statement C Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) {1534} PROGRAMMING 1250.0 Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) Editorial
2740 Omkar and Forest combinatorics graphs math shortest paths Statement E Codeforces Round 724 (Div. 2) {1536} PROGRAMMING 2250.0 Codeforces Round #724 — Editorial 2300
769 AquaMoon and Permutations combinatorics constructive algorithms graph matchings graphs Statement C Codeforces Round 732 (Div. 1) {1545} PROGRAMMING 1500.0 Codeforces Round #732 Editorial 2800
16978 Running for Gold combinatorics graphs greedy probabilities sortings Statement B Codeforces Global Round 15 {1552} PROGRAMMING 500.0 Editorial of Global Round 15
3788 Permutation Shift brute force combinatorics constructive algorithms dfs and similar graphs math Statement E Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2) {1553} PROGRAMMING 1750.0 Harbour.Space Scholarship Contest 2021-2022 (Div. 1 + Div. 2) Editorial
1423 Sports Betting bitmasks combinatorics dp graphs math probabilities Statement F Deltix Round, Summer 2021 (open for everyone, rated, Div. 1 + Div. 2) {1556} PROGRAMMING 2500.0 94384 2500
747 Occurrences combinatorics dp dsu fft graphs Statement F Educational Codeforces Round 114 (Rated for Div. 2) {1574} PROGRAMMING 95188
1563 Dominoes combinatorics fft graphs math Statement D Codeforces Round 758 (Div.1 + Div. 2) {1608} PROGRAMMING 1500.0 Editorial of Codeforces Round #758 (Div.1 + Div. 2)
2506 Star MST combinatorics dp math Statement E Educational Codeforces Round 125 (Rated for Div. 2) {1657} PROGRAMMING 101161
1452 Coloring brute force combinatorics constructive algorithms dfs and similar dp dsu graphs implementation Statement E Educational Codeforces Round 130 (Rated for Div. 2) {1697} PROGRAMMING 103835
299 Imitating the Key Tree combinatorics dsu trees Statement I COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1725} PROGRAMMING Tutorial
1016 Tick, Tock 2-sat combinatorics dfs and similar dsu graphs Statement E Codeforces Round 836 (Div. 2) {1758} PROGRAMMING 2250.0 Codeforces Round #836 (Div. 2) Editorial
11228 Playoff combinatorics constructive algorithms dp graphs greedy Statement D Educational Codeforces Round 140 (Rated for Div. 2) {1767} PROGRAMMING 110225
3828 Game on Axis combinatorics dsu graphs implementation Statement D TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) {1787} PROGRAMMING 2000.0 TypeDB Forces 2023 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
5522 Counting Graphs combinatorics divide and conquer dsu graphs greedy sortings Statement G Codeforces Round 891 (Div. 3) {1857} PROGRAMMING 119134
834 Swaps combinatorics graphs Statement G Pinely Round 2 (Div. 1 + Div. 2) {1863} PROGRAMMING 2750.0
1050 Lexichromatography combinatorics dfs and similar dsu graphs two pointers Statement D Codeforces Round 902 (Div. 1, based on COMPFEST 15 - Final Round) {1876} PROGRAMMING 1750.0 Codeforces Round #902 (Div. 1, Div. 2, based on COMPFEST 15 — Final Round) Editorial
282 Cacti Symphony combinatorics dfs and similar dp graphs Statement E Codeforces Round 908 (Div. 1) {1893} PROGRAMMING 2750.0 Codeforces Round 908 (Div. 1, Div, 2) Editorial
1103 Count BFS Graph combinatorics dp Statement J 2023-2024 ICPC, Asia Jakarta Regional Contest (Online Mirror, Unrated, ICPC Rules, Teams Preferred) {1906} PROGRAMMING problem_analysis.pdf
2413 Light Bulbs (Easy Version) brute force combinatorics dfs and similar dp dsu graphs math Statement G1 Codeforces Round 916 (Div. 3) {1914} PROGRAMMING Codeforces Round 916 (Div. 3) Editorial
1834 Light Bulbs (Hard Version) combinatorics data structures dfs and similar dp dsu graphs hashing Statement G2 Codeforces Round 916 (Div. 3) {1914} PROGRAMMING Codeforces Round 916 (Div. 3) Editorial
12151 Chat Screenshots combinatorics dfs and similar graphs implementation Statement F Codeforces Round 925 (Div. 3) {1931} PROGRAMMING 125878
6519 Non-academic Problem combinatorics dfs and similar dsu graphs Statement F Codeforces Round 954 (Div. 3) {1986} PROGRAMMING 130762
2904 Cases bitmasks brute force combinatorics dfs and similar dp graphs greedy strings Statement D Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 2250.0 Video Tutorial
169 Dora's Paint brute force combinatorics constructive algorithms graphs Statement F Codeforces Round 969 (Div. 1) {2006} PROGRAMMING 3000.0 Tutorial
768 Billetes MX (Easy Version) 2-sat binary search combinatorics dfs and similar dsu graphs Statement E1 Codeforces Round 978 (Div. 2) {2022} PROGRAMMING 2250.0 Codeforces Round 978 (Div 2) Editorial
717 Billetes MX (Hard Version) binary search combinatorics dfs and similar dsu graphs Statement E2 Codeforces Round 978 (Div. 2) {2022} PROGRAMMING 1000.0 Codeforces Round 978 (Div 2) Editorial
2690 Control of Randomness combinatorics dfs and similar graphs greedy math probabilities trees Statement E Codeforces Round 992 (Div. 2) {2040} PROGRAMMING 2250.0 Codeforces Round #992 (Div.2) Editorial
3870 She knows... combinatorics constructive algorithms graphs math Statement E Codeforces Round 1014 (Div. 2) {2092} PROGRAMMING 2250.0 Codeforces Round #1014 (Div. 2) Editorial
1947 Baggage Claim combinatorics dsu graphs math trees Statement B Codeforces Round 1021 (Div. 1) {2097} PROGRAMMING 1000.0 142316
3411 Tree Colorings combinatorics dp graphs math trees Statement E Educational Codeforces Round 180 (Rated for Div. 2) {2112} PROGRAMMING Educational Codeforces Round 180 — Editorial
6469 Root was Built by Love, Broken by Destiny combinatorics dfs and similar graphs trees Statement D Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 2000.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
894 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
263 Distinct GCDs (Hard Version) combinatorics constructive algorithms graphs graphs graphs math number theory number theory Statement F2 Codeforces Round 1067 (Div. 2) {2158} PROGRAMMING 1000.0 Codeforces Round 1067 (Div. 2) Editorial
1905 Twin Polynomials combinatorics graph matchings graphs math Statement C Codeforces Round 1058 (Div. 1) {2159} PROGRAMMING 1500.0 Codeforces Round 1058 Editorial
353 SubMST combinatorics graphs trees Statement F Pinely Round 5 (Div. 1 + Div. 2) {2161} PROGRAMMING 3250.0
3719 Interactive Graph (Simple Version) combinatorics dfs and similar dp graphs interactive Statement C1 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 750.0 Tutorial
2612 Interactive Graph (Hard Version) combinatorics dfs and similar dp graphs interactive Statement C2 Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 750.0 Tutorial
1546 Deconstruction Tree combinatorics data structures dp graphs trees Statement E Spectral::Cup 2026 Round 2 (Codeforces Round 1100, Div. 1 + Div. 2) {2229} PROGRAMMING 2500.0 Spectral::Cup 2026 Round 2 (Codeforces Round 1100, Div. 1 + Div. 2) Editorial