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
1627 First Digit Law dp math probabilities Statement C Codeforces Beta Round 50 {54} PROGRAMMING Codeforces Beta Round #50: Editorial for problem E 2000
7314 Round Table Knights dp math number theory Statement C Codeforces Beta Round 65 (Div. 2) {71} PROGRAMMING Разбор задач Codeforces Beta Round #65 (Div. 2) 1600
1032 Numbers dp math number theory Statement D Codeforces Beta Round 72 (Div. 1 Only) {83} PROGRAMMING разбор E 2400
539 Lostborn dp math number theory Statement E Codeforces Beta Round 76 (Div. 1 Only) {93} PROGRAMMING Codeforces Beta Round 76 - задача Е div 1 глазами ее автора. 2600
524 Gifts combinatorics dp math probabilities Statement E Codeforces Round 142 (Div. 1) {229} PROGRAMMING Codeforces Round #142 Problem Analysis 2500
884 Number Challenge combinatorics dp implementation math number theory Statement E Codeforces Round 146 (Div. 1) {235} PROGRAMMING Codeforces Round #146 Tutorial 2600
640 Cows and Cool Sequences dp math number theory Statement D Codeforces Round 174 (Div. 1) {283} PROGRAMMING Editorial for Codeforces #174 2400
10545 Bear and Prime Numbers binary search brute force data structures dp implementation math number theory Statement C Codeforces Round 226 (Div. 2) {385} PROGRAMMING Codeforces Round #226 (Div. 2) — Editorial 1800
2782 Upgrading Array dp greedy math number theory Statement D Codeforces Round 236 (Div. 2) {402} PROGRAMMING Editorial Codeforces Round #236 2000
305 Jzzhu and Squares dp math number theory Statement E Codeforces Round 257 (Div. 1) {449} PROGRAMMING Codeforces Round #257 Editorial 2900
2083 Pluses everywhere combinatorics dp math number theory Statement E Codeforces Round 295 (Div. 2) {520} PROGRAMMING Codeforces Round #295 Editorial (now with bonuses!) 2500
537 Superhero's Job dfs and similar dp hashing math number theory Statement D VK Cup 2015 - Round 3 (unofficial online mirror, Div. 1 only) {542} PROGRAMMING 17697 2600
13720 Soldier and Number Game constructive algorithms dp math number theory Statement D Codeforces Round 304 (Div. 2) {546} PROGRAMMING Codeforces Round #304 (Div.2) editorial 1700
3383 Mike and Foam bitmasks combinatorics dp math number theory Statement C Codeforces Round 305 (Div. 1) {547} PROGRAMMING Codeforces Round #305 Editorial 2700
5861 Vanya and Scales brute force dp greedy math meet-in-the-middle number theory Statement C Codeforces Round 308 (Div. 2) {552} PROGRAMMING Codeforces #308 (Div. 2) Editorial 1800
8026 Gerald and Giant Chess combinatorics dp math number theory Statement C Codeforces Round 313 (Div. 1) {559} PROGRAMMING Codeforces Round 313 — Extended editoral 2500
4291 Clique in the Divisibility Graph dp math number theory Statement F VK Cup 2015 - Finals, online mirror {566} PROGRAMMING Editorial for VK Cup 2015 — Finals 1600
739 Number of Binominal Coefficients dp math number theory Statement D Codeforces Round 323 (Div. 1) {582} PROGRAMMING Codeforces Round #323 Editorial 3100
1570 Little Artem and Random Variable dp implementation math probabilities Statement D VK Cup 2016 - Round 2 {641} PROGRAMMING VK Cup 2016 — Раунд 2 (editorial) 2300
748 Four Divisors dp math number theory Statement F Educational Codeforces Round 12 {665} PROGRAMMING Editorial 2600
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
115 Math, math everywhere brute force dp math meet-in-the-middle number theory Statement G Codeforces Round 397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined) {765} PROGRAMMING Codeforces Round #397 Editorial 2800
1443 Vulnerable Kerbals constructive algorithms dp graphs math number theory Statement C VK Cup 2017 - Round 2 {772} PROGRAMMING VK Cup Round 2 + Codeforces Round #409 Tutorial 2400
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
3656 Anton and School - 2 combinatorics dp math number theory Statement D Codeforces Round 404 (Div. 2) {785} PROGRAMMING Editorial 2200
4982 Divide by Three dp greedy math number theory Statement C Educational Codeforces Round 18 {792} PROGRAMMING Educational Codeforces Round 18 - Editorial 2000
3282 My pretty girl Noora brute force dp greedy math number theory Statement D Codeforces Round 422 (Div. 2) {822} PROGRAMMING Codeforces Round #422 (Div. 2) Editorial 1800
3541 Winter is here combinatorics dp math number theory Statement D Codeforces Round 428 (Div. 2) {839} PROGRAMMING Codeforces Round #428 editorial 2200
9758 Maximum splitting dp greedy math number theory Statement C Technocup 2018 - Elimination Round 2 {870} PROGRAMMING Editorial Codeforces Round 440 Div.1+Div.2 (and Technocup 2018 — Elimination Round 2) 1300
14178 Pride brute force dp greedy math number theory Statement A Codeforces Round 446 (Div. 1) {891} PROGRAMMING Codeforces Round #446 Editorial 1600
4186 Counting Arrays combinatorics dp math number theory Statement E Educational Codeforces Round 33 (Rated for Div. 2) {893} PROGRAMMING 55989 2000
3771 Unusual Sequences bitmasks combinatorics dp math number theory Statement D Codeforces Round 450 (Div. 2) {900} PROGRAMMING Codeforces Round #450(Div. 2). Editorial. 2100
2171 Kuro and GCD and XOR and SUM binary search bitmasks brute force data structures dp dsu greedy math number theory strings trees Statement D Codeforces Round 482 (Div. 2) {979} PROGRAMMING 1750.0 Codeforces Round #482 (Div. 2) Editorial 2200
3002 Perfect Groups dp math number theory Statement D Codeforces Round 480 (Div. 2) {980} PROGRAMMING Tutorial 2100
4113 Recovering BST brute force dp math number theory trees Statement D Codeforces Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) {1025} PROGRAMMING Codeforces Round #505 Editorial 2000
2981 Make It One bitmasks combinatorics dp math number theory shortest paths Statement F Codeforces Round 519 by Botan Investments {1043} PROGRAMMING Codeforces Round #519 Editorial 2500
10690 Multiplicity data structures dp implementation math number theory Statement C Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 1700
3163 Makoto and a Blackboard dp math number theory probabilities Statement D Hello 2019 {1097} PROGRAMMING 64310 2200
3900 Compression dp implementation math number theory Statement D Educational Codeforces Round 59 (Rated for Div. 2) {1107} PROGRAMMING Educational Codeforces Round 59 Editorial 1800
1499 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
2694 Steps to One dp math number theory probabilities Statement D Codeforces Round 548 (Div. 2) {1139} PROGRAMMING Codeforces Round #548 Editorial 2300
1771 Ehab and the Expected GCD Problem combinatorics dp math number theory Statement E Codeforces Round 563 (Div. 2) {1174} PROGRAMMING Codeforces round #563 editorial 2500
3313 Product Oriented Recurrence dp math matrices number theory Statement E Codeforces Round 566 (Div. 2) {1182} PROGRAMMING 67614 2200
1162 Graph Traveler brute force data structures dfs and similar dp graphs implementation math number theory Statement F Codeforces Round 578 (Div. 2) {1200} PROGRAMMING Codeforces Round #578 (Div. 2) Editorial 2500
2046 Natasha, Sasha and the Prefix Sums combinatorics dp math number theory Statement E Codeforces Round 581 (Div. 2) {1204} PROGRAMMING 69244 2400
2470 Cards combinatorics dp math number theory probabilities Statement F Educational Codeforces Round 78 (Rated for Div. 2) {1278} PROGRAMMING Educational Codeforces Round 78 Editorial 2600
966 Chaotic V. dp graphs greedy math number theory trees Statement D Codeforces Round 614 (Div. 1) {1292} PROGRAMMING 1750.0 Codeforces Round #614 Editorial 2700
29282 Orac and Models dp math number theory Statement B Codeforces Round 641 (Div. 2) {1350} PROGRAMMING 1000.0 Codeforces Round #641 Editorial 1400
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
7785 Strange Beauty dfs and similar dp math number theory Statement G Codeforces Round 697 (Div. 3) {1475} PROGRAMMING Codeforces Round #697 (Div. 3) Editorial
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
9092 Square-free division (easy version) data structures dp greedy math number theory Statement E1 Codeforces Round 708 (Div. 2) {1497} PROGRAMMING 1500.0 Codeforces Round #708 Editorial 1700
1910 Square-free division (hard version) data structures dp greedy hashing math number theory Statement E2 Codeforces Round 708 (Div. 2) {1497} PROGRAMMING 1500.0 Codeforces Round #708 Editorial 2500
2113 Digits brute force dp math number theory Statement D 2020-2021 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1510} PROGRAMMING nerc-2020-offline-tutorial.pdf
9246 Short Task brute force dp math number theory Statement G Codeforces Round 713 (Div. 3) {1512} PROGRAMMING Codeforces Round #713 (Div. 3) Editorial
36530 I Hate 1111 dp math number theory Statement B Codeforces Round 723 (Div. 2) {1526} PROGRAMMING 1000.0 Codeforces Round #723 (Div. 2) Editorial
1370 You dfs and similar dp math number theory Statement E Codeforces Round 735 (Div. 2) {1554} PROGRAMMING 3000.0 Editorial of Codeforces Round #735 (Div. 2) 2600
5260 Up the Strip brute force dp math number theory Statement B Codeforces Round 740 (Div. 1, based on VK Cup 2021 - Final (Engine)) {1558} PROGRAMMING 1250.0 Codeforces Round #740 Editorial 1900
2703 Mocha and Stars combinatorics dp fft math number theory Statement E Codeforces Round 738 (Div. 2) {1559} PROGRAMMING 3000.0 Tutorial (en) 2200
6087 Up the Strip (simplified version) brute force data structures dp math number theory Statement D1 Codeforces Round 740 (Div. 2, based on VK Cup 2021 - Final (Engine)) {1561} PROGRAMMING 1500.0 Codeforces Round #740 Editorial 1700
152 Xor-quiz constructive algorithms dp interactive math number theory Statement H Codeforces Global Round 16 {1566} PROGRAMMING 3750.0 Codeforces Global Round 16 Editorial
5553 Half of Same dp math number theory Statement D2 Codeforces Round 748 (Div. 3) {1593} PROGRAMMING Editorial for Codeforces Round #748 (Div.3)
2259 Extreme Extension dp greedy math number theory Statement C Codeforces Round 752 (Div. 1) {1603} PROGRAMMING 1750.0 Editorial of Codeforces Round #752 2300
1008 Christmas Chocolates dfs and similar dp games graphs implementation math number theory shortest paths trees Statement E Codeforces Round 761 (Div. 2) {1617} PROGRAMMING 3000.0 Editorial for Codeforces Round #761 (Div. 2)
900 A Random Code Problem combinatorics dp math number theory Statement F Educational Codeforces Round 121 (Rated for Div. 2) {1626} PROGRAMMING 99136
9335 Not Adding dp math number theory Statement D Codeforces Round 766 (Div. 2) {1627} PROGRAMMING 1750.0 Codeforces Round #766 (Div. 2) Editorial
5313 New Year Concert binary search data structures dp greedy math number theory two pointers Statement D Codeforces Round 769 (Div. 2) {1632} PROGRAMMING 2000.0 Editorial of Codeforces Round #769
7040 Infinite Set dp math matrices number theory strings Statement D Codeforces Round 772 (Div. 2) {1635} PROGRAMMING 2250.0 Codeforces Round #772 Editorial
5691 Madoka and the Best School in Russia dp math number theory Statement D Codeforces Round 777 (Div. 2) {1647} PROGRAMMING 2000.0 Codeforces Round #777 Editorial
1174 Gojou and Matrix Game data structures dp games math number theory sortings Statement E Codeforces Round 779 (Div. 2) {1658} PROGRAMMING 2500.0 Codeforces Round #779 (Div. 2) Editorial
17906 Palindrome Basis dp math number theory Statement C Codeforces Round 785 (Div. 2) {1673} PROGRAMMING 1500.0 Codeforces Round #785 (Div. 2) Editorial
3465 Graph Cost dp greedy math number theory Statement E Codeforces Round 841 (Div. 2) and Divide by Zero 2022 {1731} PROGRAMMING 2000.0 Codeforces Round #841 (Div. 2) and Divide By Zero 2022 Editorial
7334 Count GCD bitmasks combinatorics dp math number theory Statement D CodeTON Round 3 (Div. 1 + Div. 2, Rated, Prizes!) {1750} PROGRAMMING 1750.0 CodeTON Round 3 (Div. 1 + Div. 2) Editorial
10500 Lucky Chains brute force dp greedy math number theory Statement D Educational Codeforces Round 139 (Rated for Div. 2) {1766} PROGRAMMING 110066
4450 Counting Factorizations combinatorics dp math number theory Statement D Codeforces Round 856 (Div. 2) {1794} PROGRAMMING 2000.0 Codeforces Round 856 (Div. 2) Editorial
643 Gifts from Grandfather Ahmed dp math number theory Statement F Codeforces Round 860 (Div. 2) {1798} PROGRAMMING 3000.0 Editorial of Codeforces Round 860 (Div. 2) 2500
14374 Living Sequence binary search dp math number theory Statement E Codeforces Round 863 (Div. 3) {1811} PROGRAMMING 114788
419 Bosco and Particle dp math number theory strings Statement E Codeforces Round 865 (Div. 1) {1815} PROGRAMMING 3000.0 Editorial of Codeforces Round #865 3100
4030 Counting Rhyme brute force combinatorics dp math number theory sortings Statement D Codeforces Round 904 (Div. 2) {1884} PROGRAMMING 2500.0 Codeforces Round #904 (Div. 2) Editorial
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
14797 Vlad and an Odd Ordering binary search bitmasks data structures dp implementation math number theory Statement E Codeforces Round 928 (Div. 4) {1926} PROGRAMMING 126132
2088 Modular Sequence constructive algorithms dp greedy implementation math number theory Statement E Codeforces Round 924 (Div. 2) {1928} PROGRAMMING 2250.0 Codeforces Round 924 Editorial
1234 Nobody is needed brute force data structures dp math number theory Statement F Codeforces Round 936 (Div. 2) {1946} PROGRAMMING 2750.0 Codeforces Round #936 (Div. 2) Editorial
3165 Girl Permutation combinatorics dp math number theory Statement E Codeforces Round 936 (Div. 2) {1946} PROGRAMMING 2250.0 Codeforces Round #936 (Div. 2) Editorial
5864 GCD on a grid brute force dfs and similar dp math number theory Statement G Codeforces Round 938 (Div. 3) {1955} PROGRAMMING 128243
1616 Carousel of Combinations brute force combinatorics dp math number theory Statement E Codeforces Round 940 (Div. 2) and CodeCraft-23 {1957} PROGRAMMING 2250.0 Codeforces Round #940 and CodeCraft-23 (Div. 2) Editorial 2400
8011 Nikita and LCM brute force data structures dp greedy math number theory sortings Statement C Codeforces Round 948 (Div. 2) {1977} PROGRAMMING 1750.0 129858 1900
1002 Court Blue (Easy Version) brute force dfs and similar dp math number theory Statement F1 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) {2002} PROGRAMMING 2000.0 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial
575 Court Blue (Hard Version) brute force dp math number theory Statement F2 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) {2002} PROGRAMMING 1250.0 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial
4199 Prefix GCD brute force dp greedy math number theory Statement E Codeforces Round 973 (Div. 2) {2013} PROGRAMMING 2500.0 134298
3963 Expected Power bitmasks brute force dp math number theory probabilities Statement E Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 {2020} PROGRAMMING 2000.0 Tutorial for Codeforces Round 976 (Div. 2) and Divide By Zero 9.0
264 Count Leaves dp math number theory Statement F Codeforces Round 976 (Div. 2) and Divide By Zero 9.0 {2020} PROGRAMMING 2750.0 Tutorial for Codeforces Round 976 (Div. 2) and Divide By Zero 9.0
3712 Natlan Exploring combinatorics dp math number theory Statement G Codeforces Round 988 (Div. 3) {2037} PROGRAMMING Video Tutorial
1770 Grid Walk dp greedy math number theory Statement K 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2038} PROGRAMMING 2100
500 Shohag Loves Counting (Easy Version) combinatorics dp math number theory Statement F1 CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!) {2039} PROGRAMMING 2000.0 Editorial of CodeTON Round 9 (Div. 1 + Div. 2)
5476 Small Operations binary search bitmasks brute force dfs and similar dp math number theory sortings Statement F Codeforces Round 1027 (Div. 3) {2114} PROGRAMMING 143268
2026 Build an Array bitmasks dp math number theory Statement G Codeforces Round 1027 (Div. 3) {2114} PROGRAMMING 143268
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
155 Beyond the Palindrome (Hard Version) combinatorics dp math number theory Statement E2 Codeforces Round 1046 (Div. 1) {2135} PROGRAMMING 2000.0 Codeforces Round 1046 (Div. 1, Div. 2) Editorial
1463 Omega Numbers bitmasks dp math number theory Statement F Codeforces Round 1070 (Div. 2) {2176} PROGRAMMING 2750.0 Codeforces Round 1070 (Div.2) Editorial
2827 LCM is Legendary Counting Master dp math number theory Statement E Hello 2026 {2183} PROGRAMMING 2250.0
1906 Little String (Hard Version) binary search combinatorics dp greedy math number theory Statement D2 Codeforces Round 1075 (Div. 2) {2189} PROGRAMMING 750.0 Codeforces Round 1075 (Div. 2) Editorial
15017 Product Queries dp math number theory Statement E Codeforces Round 1076 (Div. 3) {2193} PROGRAMMING Разбор Codeforces Round 1076 (Div. 3)