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
1018 Ladies' Shop constructive algorithms fft math Statement E Codeforces Round 176 (Div. 1) {286} PROGRAMMING Tutorial 2600
852 Painting Square dp fft Statement D Codeforces Round 181 (Div. 2) {300} PROGRAMMING English Tutorial 2700
2126 The Child and Binary Tree combinatorics divide and conquer fft number theory Statement E Codeforces Round 250 (Div. 1) {438} PROGRAMMING Tutorial 3100
1155 DZY Loves FFT probabilities Statement B Codeforces Round 254 (Div. 1) {444} PROGRAMMING Codeforces Round #254 Editorial 2400
462 Design Tutorial: Increase the Constraints bitmasks data structures fft Statement G Codeforces Round 270 {472} PROGRAMMING Editorial 2800
2840 Fuzzy Search bitmasks brute force fft Statement D Codeforces Round 296 (Div. 1) {528} PROGRAMMING Codeforces Round #296 Editorial 2500
620 Kyoya and Train dp fft graphs math probabilities Statement E Codeforces Round 309 (Div. 1) {553} PROGRAMMING Codeforces Round #309 Editorial 3300
611 Transforming Sequence combinatorics dp fft math Statement E AIM Tech Round (Div. 1) {623} PROGRAMMING AIM Tech Round Tutorial 3300
3516 Thief in a Shop divide and conquer dp fft math Statement E Educational Codeforces Round 9 {632} PROGRAMMING 43493 2500
2422 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
451 Complete the Permutations combinatorics fft graphs math Statement E Codeforces Round 372 (Div. 1) {715} PROGRAMMING Codeforces Round #372 Editorial 3400
561 Dasha and cyclic table bitmasks brute force fft strings trees Statement E Codeforces Round 390 (Div. 2) {754} PROGRAMMING 2800
1022 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
218 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
1198 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
242 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
532 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
98 Cyclic Cipher fft math Statement E Codeforces Round 453 (Div. 1) {901} PROGRAMMING Codeforces Round #453 (Div. 1 & Div. 2) Editorial 3300
1132 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
513 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
1283 Yet Another String Matching Problem fft math Statement I Educational Codeforces Round 40 (Rated for Div. 2) {954} PROGRAMMING 58519 2600
914 Lightsabers (hard) fft Statement F3 Helvetic Coding Contest 2018 online mirror (teams allowed, unrated) {958} PROGRAMMING helvetic-coding-contest-2018-editorial.pdf 2600
1201 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
288 K Paths combinatorics data structures dp fft math Statement H Avito Code Challenge 2018 {981} PROGRAMMING Avito Code Challenge 2018 — разбор 2900
355 Perfect Encoding fft math Statement D Codeforces Round 485 (Div. 1) {986} PROGRAMMING Codeforces Round #485 Editorial 2600
1766 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
259 Tree fft graphs trees Statement F Codeforces Round 499 (Div. 1) {1010} PROGRAMMING 60851 3400
461 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
1769 Covered Points fft geometry number theory Statement E Educational Codeforces Round 50 (Rated for Div. 2) {1036} PROGRAMMING 61727 2300
211 Epic Convolution chinese remainder theorem fft math number theory Statement H Mail.Ru Cup 2018 Round 1 {1054} PROGRAMMING Editorial 3400
1953 Lucky Tickets divide and conquer dp fft Statement G Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2400
281 Radix sum fft math number theory Statement E Codeforces Round 534 (Div. 1) {1103} PROGRAMMING Codeforces Round #534 — Editorial 3300
5549 Pavel and Triangles brute force dp fft greedy ternary search Statement E Codeforces Global Round 2 {1119} PROGRAMMING Codeforces Global Round 2 Editorial 1900
791 Triple fft math Statement H Codeforces Global Round 2 {1119} PROGRAMMING Codeforces Global Round 2 Editorial 3100
154 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
472 Product Tuples divide and conquer fft Statement E Bubble Cup 12 - Finals [Online Mirror, unrated, Div. 1] {1218} PROGRAMMING E 2500
594 Xor Spanning Tree divide and conquer fft graphs Statement D Bubble Cup 12 - Finals [Online Mirror, unrated, Div. 1] {1218} PROGRAMMING E 2600
976 Red-White Fence combinatorics fft Statement F Educational Codeforces Round 75 (Rated for Div. 2) {1251} PROGRAMMING 70860 2600
730 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
316 Xor on Figures constructive algorithms fft math Statement I Good Bye 2019 {1270} PROGRAMMING Разбор Goodbye 2019 3400
294 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
412 Substring Search brute force fft Statement G Educational Codeforces Round 85 (Rated for Div. 2) {1334} PROGRAMMING Educational Codeforces Round 85 Editorial
3536 Placing Rooks combinatorics fft math Statement E Educational Codeforces Round 86 (Rated for Div. 2) {1342} PROGRAMMING 76633 2300
516 Slime and Sequences (Easy Version) dp fft math Statement F1 Codeforces Round 641 (Div. 1) {1349} PROGRAMMING 1750.0 Codeforces Round #641 Editorial 3100
134 Slime and Sequences (Hard Version) dp fft math Statement F2 Codeforces Round 641 (Div. 1) {1349} PROGRAMMING 1750.0 Codeforces Round #641 Editorial 3500
231 Kevin and Grid fft graphs math Statement I Codeforces Global Round 10 {1392} PROGRAMMING 4000.0 Codeforces Global Round 10 — Editorial
1273 Running Competition bitmasks fft math number theory Statement G Educational Codeforces Round 93 (Rated for Div. 2) {1398} PROGRAMMING Educational Codeforces Round 93 Editorial
1292 Clusterization Counting combinatorics dp dsu fft graphs Statement G Grakn Forces 2020 {1408} PROGRAMMING 3000.0 Grakn Forces -- Editorial
512 Multithreading (Easy Version) combinatorics fft math Statement H1 Codeforces Global Round 12 {1450} PROGRAMMING 2750.0 Codeforces Global Round 12 Editorial
454 Tiles combinatorics dp fft math Statement G Educational Codeforces Round 102 (Rated for Div. 2) {1473} PROGRAMMING Educational Codeforces Round 102 Editorial
163 Nezzar and Chocolate Bars combinatorics fft math probabilities Statement F Codeforces Round 698 (Div. 1) {1477} PROGRAMMING 4000.0 87294 3500
264 School Clubs dp fft math number theory probabilities Statement E Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 4000.0 Editorial of Codeforces Round #700
42 Flower Shop *special fft math Statement J Kotlin Heroes: Episode 6 {1488} PROGRAMMING 88522
337 AmShZ Farm combinatorics fft math Statement F Codeforces Round 722 (Div. 1) {1528} PROGRAMMING 3000.0 Codeforces Round #722 Editorial
1433 Abnormal Permutation Pairs (easy version) combinatorics dp fft math Statement E1 Codeforces Round 729 (Div. 2) {1542} PROGRAMMING 2000.0
2015 The Three Little Pigs combinatorics dp fft math Statement C Codeforces Round 736 (Div. 1) {1548} PROGRAMMING 1750.0 Codeforces Round 736 Editorial
311 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
2703 Mocha and Stars combinatorics dp fft math number theory Statement E Codeforces Round 738 (Div. 2) {1559} PROGRAMMING 3000.0 Tutorial (en) 2200
740 Occurrences combinatorics dp dsu fft graphs Statement F Educational Codeforces Round 114 (Rated for Div. 2) {1574} PROGRAMMING 95188
148 Problems for Codeforces fft math Statement F Codeforces Round 745 (Div. 1) {1580} PROGRAMMING 3500.0 Codeforces Round #745 Editorial 3300
1550 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)
827 Tree Coloring combinatorics fft Statement F Educational Codeforces Round 118 (Rated for Div. 2) {1613} PROGRAMMING 97467
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
290 Special Positions combinatorics fft Statement E Codeforces Round 773 (Div. 1) {1641} PROGRAMMING 2250.0 Codeforces Round #773 editorial
427 Basis combinatorics fft math number theory Statement F Educational Codeforces Round 123 (Rated for Div. 2) {1644} PROGRAMMING 100227
100 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
803 Centroid Probabilities combinatorics dp fft math Statement E Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2750.0 Codeforces Round #783 Editorial 3000
423 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
237 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
110 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
133 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
678 Multiset of Strings dp fft flows graphs greedy math Statement F Educational Codeforces Round 132 (Rated for Div. 2) {1709} PROGRAMMING 105164
6219 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
1702 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
846 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
2261 Partial Sorting combinatorics fft math number theory Statement E Codeforces Round 842 (Div. 2) {1768} PROGRAMMING 2250.0 Codeforces Round #842 (Div. 2) Editorial
187 Koxia and Bracket divide and conquer fft math Statement G Good Bye 2022: 2023 is NEAR {1770} PROGRAMMING 3250.0 Good Bye 2022 -- Editorial
857 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
501 Graph Coloring (hard version) brute force fft Statement F2 Educational Codeforces Round 142 (Rated for Div. 2) {1792} PROGRAMMING 111835
935 Timber combinatorics dp fft math Statement F Educational Codeforces Round 147 (Rated for Div. 2) {1821} PROGRAMMING 115296
430 Swimmers in the Pool fft math number theory Statement F Educational Codeforces Round 151 (Rated for Div. 2) {1845} PROGRAMMING 117791
116 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
141 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
174 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)
1431 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
2065 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
805 Palindrome fft meet-in-the-middle Statement H April Fools Day Contest 2024 {1952} PROGRAMMING April Fools Day Contest 2024 Editorial
377 Again Counting Arrays (Easy Version) combinatorics dp fft math Statement E1 Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 1750.0 Tutorial 3100
339 Zimpha Fan Club fft greedy math strings Statement G Codeforces Round 947 (Div. 1 + Div. 2) {1975} PROGRAMMING 3000.0 editorial_zh.pdf 3000
408 Heartbeat combinatorics dp fft math Statement F Codeforces Round 958 (Div. 2) {1988} PROGRAMMING 3500.0 Editorial of Codeforces Round 958 (Div. 2)
559 Prime Split Game fft games math number theory Statement H Pinely Round 4 (Div. 1 + Div. 2) {1991} PROGRAMMING 3500.0 Video Tutorial
2354 Card Game combinatorics dp fft greedy math Statement E Educational Codeforces Round 170 (Rated for Div. 2) {2025} PROGRAMMING Educational Codeforces Round 170 Editorial
14084 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
480 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
57 Kevin and Puzzle (Hard Version) bitmasks fft math Statement I2 Codeforces Global Round 28 {2048} PROGRAMMING 3000.0 Tutorial
2301 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
1749 Blossom combinatorics fft math Statement E Teza Round 1 (Codeforces Round 1015, Div. 1 + Div. 2) {2084} PROGRAMMING 2250.0 141155
837 Blurry Vision *special fft math Statement H April Fools Day Contest 2025 {2095} PROGRAMMING April Fools Day Contest 2025 Editorial
222 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
27869 Difficult Contest constructive algorithms implementation sortings strings Statement A Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
3340 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
520 Cost of Coloring combinatorics fft math Statement G Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
330 Subsequence Problem combinatorics dp fft math Statement F Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
447 Mosaic Tree combinatorics dp fft math trees Statement F Codeforces Round 1069 (Div. 1) {2174} PROGRAMMING 3500.0 Codeforces Round 1069 Editorial
166 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
871 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
269 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
376 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)