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
1024 Ladies' Shop constructive algorithms fft math Statement E Codeforces Round 176 (Div. 1) {286} PROGRAMMING Tutorial 2600
860 Painting Square dp fft Statement D Codeforces Round 181 (Div. 2) {300} PROGRAMMING English Tutorial 2700
2163 The Child and Binary Tree combinatorics divide and conquer fft number theory Statement E Codeforces Round 250 (Div. 1) {438} PROGRAMMING Tutorial 3100
1178 DZY Loves FFT probabilities Statement B Codeforces Round 254 (Div. 1) {444} PROGRAMMING Codeforces Round #254 Editorial 2400
464 Design Tutorial: Increase the Constraints bitmasks data structures fft Statement G Codeforces Round 270 {472} PROGRAMMING Editorial 2800
2910 Fuzzy Search bitmasks brute force fft Statement D Codeforces Round 296 (Div. 1) {528} PROGRAMMING Codeforces Round #296 Editorial 2500
625 Kyoya and Train dp fft graphs math probabilities Statement E Codeforces Round 309 (Div. 1) {553} PROGRAMMING Codeforces Round #309 Editorial 3300
623 Transforming Sequence combinatorics dp fft math Statement E AIM Tech Round (Div. 1) {623} PROGRAMMING AIM Tech Round Tutorial 3300
3606 Thief in a Shop divide and conquer dp fft math Statement E Educational Codeforces Round 9 {632} PROGRAMMING 43493 2500
2470 Binary Table bitmasks brute force divide and conquer dp fft math Statement C CROC 2016 - Final Round [Private, For Onsite Finalists Only] {662} PROGRAMMING Editorial for CROC 2016 Finals and Codeforces Round #347 2800
461 Complete the Permutations combinatorics fft graphs math Statement E Codeforces Round 372 (Div. 1) {715} PROGRAMMING Codeforces Round #372 Editorial 3400
570 Dasha and cyclic table bitmasks brute force fft strings trees Statement E Codeforces Round 390 (Div. 2) {754} PROGRAMMING 2800
1038 PolandBall and Many Other Balls combinatorics divide and conquer dp fft math number theory Statement G 8VC Venture Cup 2017 - Elimination Round {755} PROGRAMMING 8VC Venture Cup 2017 — Elimination Round [Editorial] 3100
219 Test Data Generation combinatorics divide and conquer dp fft math number theory Statement F VK Cup 2017 - Round 3 {773} PROGRAMMING VK Cup 2017 Round 3 + Codeforces Round #412 -- Tutorial 3400
1233 Rusty String fft math strings Statement E Codeforces Round 423 (Div. 1, rated, based on VK Cup Finals) {827} PROGRAMMING Codeforces Round #423 Analysis 2700
243 Days of Floral Colours combinatorics divide and conquer dp fft math Statement E Codeforces Round 431 (Div. 1) {848} PROGRAMMING Codeforces Round #431 Editorial 3400
536 Random Elections bitmasks brute force divide and conquer fft math Statement E Codeforces Round 432 (Div. 1, based on IndiaHacks Final Round 2017) {850} PROGRAMMING Codeforces Round #432 editorial 2800
99 Cyclic Cipher fft math Statement E Codeforces Round 453 (Div. 1) {901} PROGRAMMING Codeforces Round #453 (Div. 1 & Div. 2) Editorial 3300
1149 Sum the Fibonacci bitmasks divide and conquer dp fft math Statement G Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined) {914} PROGRAMMING Tutorial 2500
521 Perpetual Subtraction fft math matrices Statement E VK Cup 2018 - Round 1 {923} PROGRAMMING VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2) editorial 3100
1358 Yet Another String Matching Problem fft math Statement I Educational Codeforces Round 40 (Rated for Div. 2) {954} PROGRAMMING 58519 2600
941 Lightsabers (hard) fft Statement F3 Helvetic Coding Contest 2018 online mirror (teams allowed, unrated) {958} PROGRAMMING helvetic-coding-contest-2018-editorial.pdf 2600
1208 Bandit Blues combinatorics dp fft math Statement G Divide by Zero 2018 and Codeforces Round 474 (Div. 1 + Div. 2, combined) {960} PROGRAMMING Divide by Zero 2018 and Codeforces Round #474 (Div. 1 + Div. 2, combined) Editorial 2800
293 K Paths combinatorics data structures dp fft math Statement H Avito Code Challenge 2018 {981} PROGRAMMING Avito Code Challenge 2018 — разбор 2900
360 Perfect Encoding fft math Statement D Codeforces Round 485 (Div. 1) {986} PROGRAMMING Codeforces Round #485 Editorial 2600
1828 Nikita and Order Statistics chinese remainder theorem fft math Statement E Codeforces Round 488 by NEAR (Div. 1) {993} PROGRAMMING Codeforces Round #488 editorial 2300
264 Tree fft graphs trees Statement F Codeforces Round 499 (Div. 1) {1010} PROGRAMMING 60851 3400
466 Boolean Computer bitmasks brute force fft math Statement F Lyft Level 5 Challenge 2018 - Elimination Round {1033} PROGRAMMING The Lyft Level 5 Challenge 2018 Elimination Round (Div. 1 + Div. 2) Editorial 2800
1776 Covered Points fft geometry number theory Statement E Educational Codeforces Round 50 (Rated for Div. 2) {1036} PROGRAMMING 61727 2300
215 Epic Convolution chinese remainder theorem fft math number theory Statement H Mail.Ru Cup 2018 Round 1 {1054} PROGRAMMING Editorial 3400
2005 Lucky Tickets divide and conquer dp fft Statement G Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2400
286 Radix sum fft math number theory Statement E Codeforces Round 534 (Div. 1) {1103} PROGRAMMING Codeforces Round #534 — Editorial 3300
5579 Pavel and Triangles brute force dp fft greedy ternary search Statement E Codeforces Global Round 2 {1119} PROGRAMMING Codeforces Global Round 2 Editorial 1900
808 Triple fft math Statement H Codeforces Global Round 2 {1119} PROGRAMMING Codeforces Global Round 2 Editorial 3100
156 Heidi Learns Hashing (Hard) fft math number theory Statement A3 Helvetic Coding Contest 2019 online mirror (teams allowed, unrated) {1184} PROGRAMMING helvetic-coding-contest-2019-editorial.pdf 3100
479 Product Tuples divide and conquer fft Statement E Bubble Cup 12 - Finals [Online Mirror, unrated, Div. 1] {1218} PROGRAMMING E 2500
611 Xor Spanning Tree divide and conquer fft graphs Statement D Bubble Cup 12 - Finals [Online Mirror, unrated, Div. 1] {1218} PROGRAMMING E 2600
995 Red-White Fence combinatorics fft Statement F Educational Codeforces Round 75 (Rated for Div. 2) {1251} PROGRAMMING 70860 2600
743 Divisor Set divide and conquer fft greedy math number theory Statement G Educational Codeforces Round 76 (Rated for Div. 2) {1257} PROGRAMMING Educational Codeforces Round 76 Editorial 2700
318 Xor on Figures constructive algorithms fft math Statement I Good Bye 2019 {1270} PROGRAMMING Разбор Goodbye 2019 3400
298 Harry The Potter brute force constructive algorithms dp fft implementation math Statement F Codeforces Round 612 (Div. 1) {1286} PROGRAMMING Codeforces Round #612 - Editorial 3200
425 Substring Search brute force fft Statement G Educational Codeforces Round 85 (Rated for Div. 2) {1334} PROGRAMMING Educational Codeforces Round 85 Editorial
3625 Placing Rooks combinatorics fft math Statement E Educational Codeforces Round 86 (Rated for Div. 2) {1342} PROGRAMMING 76633 2300
520 Slime and Sequences (Easy Version) dp fft math Statement F1 Codeforces Round 641 (Div. 1) {1349} PROGRAMMING 1750.0 Codeforces Round #641 Editorial 3100
139 Slime and Sequences (Hard Version) dp fft math Statement F2 Codeforces Round 641 (Div. 1) {1349} PROGRAMMING 1750.0 Codeforces Round #641 Editorial 3500
233 Kevin and Grid fft graphs math Statement I Codeforces Global Round 10 {1392} PROGRAMMING 4000.0 Codeforces Global Round 10 — Editorial
1292 Running Competition bitmasks fft math number theory Statement G Educational Codeforces Round 93 (Rated for Div. 2) {1398} PROGRAMMING Educational Codeforces Round 93 Editorial
1345 Clusterization Counting combinatorics dp dsu fft graphs Statement G Grakn Forces 2020 {1408} PROGRAMMING 3000.0 Grakn Forces -- Editorial
515 Multithreading (Easy Version) combinatorics fft math Statement H1 Codeforces Global Round 12 {1450} PROGRAMMING 2750.0 Codeforces Global Round 12 Editorial
456 Tiles combinatorics dp fft math Statement G Educational Codeforces Round 102 (Rated for Div. 2) {1473} PROGRAMMING Educational Codeforces Round 102 Editorial
174 Nezzar and Chocolate Bars combinatorics fft math probabilities Statement F Codeforces Round 698 (Div. 1) {1477} PROGRAMMING 4000.0 87294 3500
269 School Clubs dp fft math number theory probabilities Statement E Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 4000.0 Editorial of Codeforces Round #700
43 Flower Shop *special fft math Statement J Kotlin Heroes: Episode 6 {1488} PROGRAMMING 88522
346 AmShZ Farm combinatorics fft math Statement F Codeforces Round 722 (Div. 1) {1528} PROGRAMMING 3000.0 Codeforces Round #722 Editorial
1448 Abnormal Permutation Pairs (easy version) combinatorics dp fft math Statement E1 Codeforces Round 729 (Div. 2) {1542} PROGRAMMING 2000.0
2057 The Three Little Pigs combinatorics dp fft math Statement C Codeforces Round 736 (Div. 1) {1548} PROGRAMMING 1750.0 Codeforces Round 736 Editorial
317 Stairs combinatorics divide and conquer fft math Statement I Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2) {1553} PROGRAMMING 5250.0 Harbour.Space Scholarship Contest 2021-2022 (Div. 1 + Div. 2) Editorial
2753 Mocha and Stars combinatorics dp fft math number theory Statement E Codeforces Round 738 (Div. 2) {1559} PROGRAMMING 3000.0 Tutorial (en) 2200
747 Occurrences combinatorics dp dsu fft graphs Statement F Educational Codeforces Round 114 (Rated for Div. 2) {1574} PROGRAMMING 95188
149 Problems for Codeforces fft math Statement F Codeforces Round 745 (Div. 1) {1580} PROGRAMMING 3500.0 Codeforces Round #745 Editorial 3300
1568 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)
838 Tree Coloring combinatorics fft Statement F Educational Codeforces Round 118 (Rated for Div. 2) {1613} PROGRAMMING 97467
11898 Monsters And Spells data structures dp fft greedy implementation two pointers Statement C Educational Codeforces Round 121 (Rated for Div. 2) {1626} PROGRAMMING 99136
291 Special Positions combinatorics fft Statement E Codeforces Round 773 (Div. 1) {1641} PROGRAMMING 2250.0 Codeforces Round #773 editorial
431 Basis combinatorics fft math number theory Statement F Educational Codeforces Round 123 (Rated for Div. 2) {1644} PROGRAMMING 100227
104 Three Minimums combinatorics fft math Statement H Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) {1654} PROGRAMMING 4000.0 Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) 3500
826 Centroid Probabilities combinatorics dp fft math Statement E Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2750.0 Codeforces Round #783 Editorial 3000
437 Permutation Counting brute force combinatorics dp fft math Statement F Educational Codeforces Round 127 (Rated for Div. 2) {1671} PROGRAMMING 102181
109 Koishi's Unconscious Permutation fft math Statement F Codeforces Round 796 (Div. 1) {1687} PROGRAMMING 3000.0 Editorial of Codeforces Round 796
242 Game of AI (easy version) combinatorics fft math Statement H1 CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) {1704} PROGRAMMING 2250.0 CodeTON Round 2 Editorial
113 Game of AI (hard version) combinatorics fft math Statement H2 CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) {1704} PROGRAMMING 2750.0 CodeTON Round 2 Editorial
136 Mio and Lucky Array constructive algorithms fft math strings Statement G CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) {1704} PROGRAMMING 3500.0 CodeTON Round 2 Editorial
684 Multiset of Strings dp fft flows graphs greedy math Statement F Educational Codeforces Round 132 (Rated for Div. 2) {1709} PROGRAMMING 105164
6274 Tournament Countdown constructive algorithms fft greedy greedy interactive number theory probabilities Statement D Codeforces Round 812 (Div. 2) {1713} PROGRAMMING 2000.0 Codeforces Round #812 (Div. 2) Editorial 1800
1739 Almost Perfect combinatorics fft math Statement E Codeforces Round 819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 {1726} PROGRAMMING 2250.0 Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 Editorial
864 Function Sum brute force combinatorics dp fft math Statement F Codeforces Round 841 (Div. 2) and Divide by Zero 2022 {1731} PROGRAMMING 2750.0 Codeforces Round #841 (Div. 2) and Divide By Zero 2022 Editorial
2287 Partial Sorting combinatorics fft math number theory Statement E Codeforces Round 842 (Div. 2) {1768} PROGRAMMING 2250.0 Codeforces Round #842 (Div. 2) Editorial
190 Koxia and Bracket divide and conquer fft math Statement G Good Bye 2022: 2023 is NEAR {1770} PROGRAMMING 3250.0 Good Bye 2022 -- Editorial
878 Laboratory on Pluto brute force combinatorics dp fft greedy math Statement F Codeforces Round 843 (Div. 2) {1775} PROGRAMMING 3000.0 Codeforces Round #843 (Div. 2) Editorial
507 Graph Coloring (hard version) brute force fft Statement F2 Educational Codeforces Round 142 (Rated for Div. 2) {1792} PROGRAMMING 111835
961 Timber combinatorics dp fft math Statement F Educational Codeforces Round 147 (Rated for Div. 2) {1821} PROGRAMMING 115296
438 Swimmers in the Pool fft math number theory Statement F Educational Codeforces Round 151 (Rated for Div. 2) {1845} PROGRAMMING 117791
121 Cyclic Hamming (Easy Version) divide and conquer dp fft math number theory Statement H1 CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) {1896} PROGRAMMING 4000.0 CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
145 Cyclic Hamming (Hard Version) dp fft math number theory Statement H2 CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) {1896} PROGRAMMING 1000.0 CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
181 Short Permutation Problem combinatorics dp fft math Statement I Pinely Round 3 (Div. 1 + Div. 2) {1909} PROGRAMMING 6000.0 Editorial of Pinely Round 3 (Div. 1 + Div. 2)
1455 Blueprint for Seating combinatorics divide and conquer fft math Statement B 2023-2024 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1912} PROGRAMMING Tutorials (PDF) 2000
2106 Sasha and the Happy Tree Cutting bitmasks brute force dp fft graphs greedy trees Statement E Codeforces Round 926 (Div. 2) {1929} PROGRAMMING 2500.0 Codeforces Round #926 (Div. 2) Editorial.
147 Yet Yet Another Permutation Problem divide and conquer fft math Statement E Codeforces Round 930 (Div. 1) {1936} PROGRAMMING 2500.0 Codeforces Round 930 (Div. 1, Div. 2) Editorial
812 Palindrome fft meet-in-the-middle Statement H April Fools Day Contest 2024 {1952} PROGRAMMING April Fools Day Contest 2024 Editorial
397 Again Counting Arrays (Easy Version) combinatorics dp fft math Statement E1 Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 1750.0 Tutorial 3100
345 Zimpha Fan Club fft greedy math strings Statement G Codeforces Round 947 (Div. 1 + Div. 2) {1975} PROGRAMMING 3000.0 editorial_zh.pdf 3000
436 Heartbeat combinatorics dp fft math Statement F Codeforces Round 958 (Div. 2) {1988} PROGRAMMING 3500.0 Editorial of Codeforces Round 958 (Div. 2)
570 Prime Split Game fft games math number theory Statement H Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 3500.0 Video Tutorial
2391 Card Game combinatorics dp fft greedy math Statement E Educational Codeforces Round 170 (Rated for Div. 2) {2025} PROGRAMMING Educational Codeforces Round 170 Editorial
14342 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
487 Alternative Platforms combinatorics data structures fft math sortings Statement F 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 2500
64 Kevin and Puzzle (Hard Version) bitmasks fft math Statement I2 Codeforces Global Round 28 {2048} PROGRAMMING 3000.0 Tutorial
2401 Binary Subsequence Value Sum combinatorics dp fft implementation math Statement C Codeforces Round 1008 (Div. 1) {2077} PROGRAMMING 1500.0 Codeforces Round 1008 (Div. 1, Div. 2) Editorial
1816 Blossom combinatorics fft math Statement E Teza Round 1 (Codeforces Round 1015, Div. 1 + Div. 2) {2084} PROGRAMMING 2250.0 141155
848 Blurry Vision *special fft math Statement H April Fools Day Contest 2025 {2095} PROGRAMMING April Fools Day Contest 2025 Editorial
232 Wonderful XOR Problem bitmasks combinatorics dp fft math Statement H Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) {2096} PROGRAMMING 3500.0 Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) Editorial
28309 Difficult Contest constructive algorithms implementation sortings strings Statement A Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
3478 Maple and Tree Beauty (Hard Version) bitmasks brute force dfs and similar divide and conquer dp fft trees Statement C2 Codeforces Round 1048 (Div. 1) {2138} PROGRAMMING 750.0 Codeforces Round 1048 (Div. 1, 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
348 Subsequence Problem combinatorics dp fft math Statement F Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
493 Mosaic Tree combinatorics dp fft math trees Statement F Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 3500.0 Codeforces Round 1069 Editorial
186 Again Trees... (hard version) bitmasks data structures dfs and similar dp fft trees Statement F2 Codeforces Round 1078 (Div. 2) {2194} PROGRAMMING 1750.0 Codeforces Round #1078 Editorial
930 Again Trees... (Easy Version) bitmasks dfs and similar dp fft trees Statement F1 Codeforces Round 1078 (Div. 2) {2194} PROGRAMMING 1750.0 Codeforces Round #1078 Editorial
293 ABBA Counting fft math number theory strings Statement E Codeforces Round 1082 (Div. 1) {2201} PROGRAMMING 3000.0 Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial
453 Minesweeper String fft number theory Statement F 2026 ICPC Asia Pacific Championship - Online Mirror (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2206} PROGRAMMING Tutorial (PDF)
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
692 Elections in Saransk (hard version) combinatorics dp fft math number theory Statement F2 Codeforces Round 1103 (Div. 3) {2236} PROGRAMMING