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
7931 Fortune Telling implementation number theory Statement B Codeforces Beta Round 55 (Div. 2) {59} PROGRAMMING Round 55 (DIV 2) 1200
2011 Harry Potter and Three Spells implementation math Statement A Codeforces Beta Round 60 {65} PROGRAMMING Codeforces Beta Round #60: tutorial 1800
5353 Irrational problem implementation number theory Statement A Codeforces Beta Round 62 {68} PROGRAMMING Разбор задачи D. CF62 1100
3973 Prime Permutation implementation number theory strings Statement A Codeforces Beta Round 92 (Div. 1 Only) {123} PROGRAMMING Codeforces Beta Round #92 - Analysis 1600
1481 ucyhf *special brute force implementation number theory Statement F April Fools Day Contest {171} PROGRAMMING April Fools Day Contest: editorial 1700
3144 Pseudorandom Sequence Period *special implementation number theory Statement B Croc Champ 2012 - Qualification Round {172} PROGRAMMING 1800
30225 Hexadecimal's theorem brute force constructive algorithms implementation number theory Statement A Codeforces Round 125 (Div. 2) {199} PROGRAMMING Solutions for Codeforces Round #125 1000
364 Tractor College implementation math number theory ternary search Statement E Codeforces Round 126 (Div. 2) {200} PROGRAMMING Editorial of Codeforces Round #126 (Div. 2) 2200
2912 Reducing Fractions implementation math number theory sortings Statement C Codeforces Round 137 (Div. 2) {222} PROGRAMMING Разбор задач Codeforces Round #137 (Div. 2) 2000
1013 Anniversary data structures implementation math matrices number theory Statement C Codeforces Round 140 (Div. 1) {226} PROGRAMMING Codeforces Round #140 Editorial 2100
95160 T-primes binary search implementation math number theory Statement B Codeforces Round 142 (Div. 2) {230} PROGRAMMING Codeforces Round #142 Problem Analysis 1300
884 Number Challenge combinatorics dp implementation math number theory Statement E Codeforces Round 146 (Div. 1) {235} PROGRAMMING Codeforces Round #146 Tutorial 2600
16874 Easy Number Challenge implementation number theory Statement B Codeforces Round 146 (Div. 2) {236} PROGRAMMING Codeforces Round #146 Tutorial 1300
7324 Cows and Primitive Roots implementation math number theory Statement A Codeforces Round 174 (Div. 2) {284} PROGRAMMING Editorial for Codeforces #174 1400
378 Shaass and Painter Robot brute force implementation number theory Statement D Codeforces Round 178 (Div. 2) {294} PROGRAMMING Codeforces Round #178 Editorial 2700
64806 Ilya and Bank Account implementation number theory Statement A Codeforces Round 186 (Div. 2) {313} PROGRAMMING Tutorial 900
2654 Vasily the Bear and Sequence brute force greedy implementation number theory Statement C Codeforces Round 195 (Div. 2) {336} PROGRAMMING Tutorial Codeforces Round #195 (Div. 2) 1800
5251 Find Maximum implementation math number theory Statement C Codeforces Round 205 (Div. 2) {353} PROGRAMMING 9145 1600
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
1089 Population Size greedy implementation math Statement D Codeforces Round 241 (Div. 2) {416} PROGRAMMING Codeforces Round #241 — editorial 2300
4167 Devu and Partitioning of the Array brute force constructive algorithms implementation number theory Statement C Codeforces Round 251 (Div. 2) {439} PROGRAMMING Codeforces Round #251 Editorial 1700
1633 Divisors brute force dfs and similar implementation number theory Statement E Codeforces Round 256 (Div. 2) {448} PROGRAMMING Codeforces Round #256 — Разбор 2500
13359 Little Dima and Equation brute force implementation math number theory Statement B Codeforces Round 262 (Div. 2) {460} PROGRAMMING 13465 1500
24841 Counterexample brute force implementation math number theory Statement A Codeforces Round 275 (Div. 2) {483} PROGRAMMING Codeforces Round #275 Editorial 1100
44689 Lecture implementation strings Statement B Codeforces Round 284 (Div. 2) {499} PROGRAMMING 15353 1000
20690 A and B and Team Training greedy implementation math number theory Statement C Codeforces Round 294 (Div. 2) {519} PROGRAMMING Editorial 1300
2097 GukiZ and Binary Operations combinatorics implementation math matrices number theory Statement D Codeforces Round 307 (Div. 2) {551} PROGRAMMING Tutorial 2400
5397 Primes or Palindromes? brute force implementation math number theory Statement A Codeforces Round 315 (Div. 1) {568} PROGRAMMING Codeforces Round #315 Editorial 1700
18154 Bear and Poker implementation math number theory Statement A Codeforces Round 318 [RussianCodeCup Thanks-Round] (Div. 1) {573} PROGRAMMING Codeforces Round #318 [RussianCodeCup Thanks-Round] Editorial 1400
45166 Multiplication Table implementation number theory Statement A Codeforces Round 319 (Div. 2) {577} PROGRAMMING Editorial Codeforces Round #319 1100
3476 Sum of Remainders implementation math number theory Statement E Educational Codeforces Round 5 {616} PROGRAMMING Editorial of Educational Codeforces Round 5 2200
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
10251 Co-prime Array greedy implementation math number theory Statement A Educational Codeforces Round 11 {660} PROGRAMMING Editorial of Educational Codeforces Round 11 1300
10991 Joty and Chocolate implementation math number theory Statement C Educational Codeforces Round 13 {678} PROGRAMMING Editorial 1600
524 Black Widow dp graphs implementation math Statement C Codeforces Round 366 (Div. 1) {704} PROGRAMMING Tutorial 2800
605 Cyclic Cipher chinese remainder theorem data structures implementation number theory two pointers Statement F Intel Code Challenge Elimination Round (Div. 1 + Div. 2, combined) {722} PROGRAMMING Tutorial 2800
2264 Ray Tracing greedy hashing implementation math number theory sortings Statement C Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) {724} PROGRAMMING Tutorial 1800
3137 Video Cards brute force data structures implementation math number theory Statement F Codeforces Round 376 (Div. 2) {731} PROGRAMMING 47840 1900
51720 Arpa’s hard exam and Mehrdad’s naive cheat implementation math number theory Statement A Codeforces Round 383 (Div. 2) {742} PROGRAMMING Test data 1000
56864 Bachgold Problem greedy implementation math number theory Statement A Codeforces Round 388 (Div. 2) {749} PROGRAMMING Tutorial 700
10692 Blown Garland brute force implementation number theory Statement B Codeforces Round 392 (Div. 2) {758} PROGRAMMING Codeforces Round #392 (Div. 2) Editorial 1200
776 Timofey and remoduling brute force implementation math number theory Statement C Codeforces Round 395 (Div. 1) {763} PROGRAMMING Codeforces Round #395 [Editorial] 2500
19773 k-Factorization implementation math number theory Statement A Educational Codeforces Round 19 {797} PROGRAMMING 51588 1100
6807 Treasure Hunt implementation math number theory Statement A Educational Codeforces Round 23 {817} PROGRAMMING 52638 1200
36677 I'm bored with life implementation math number theory Statement A Codeforces Round 422 (Div. 2) {822} PROGRAMMING Codeforces Round #422 (Div. 2) Editorial 800
1306 Bamboo Partition brute force data structures implementation math number theory sortings two pointers Statement C Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 2500
2057 Vasya's Function binary search implementation math Statement E Educational Codeforces Round 26 {837} PROGRAMMING 53662 2200
2127 Arpa and a list of numbers implementation number theory Statement B Codeforces Round 432 (Div. 1, based on IndiaHacks Final Round 2017) {850} PROGRAMMING Codeforces Round #432 editorial 2000
10308 Divisiblity of Differences implementation math number theory Statement B Codeforces Round 441 (Div. 2, by Moscow Team Olympiad) {876} PROGRAMMING Codeforces Round #441. Editorial. 1300
10598 Proper Nutrition brute force implementation number theory Statement B Codeforces Round 451 (Div. 2) {898} PROGRAMMING Codeforces Round #451 (Div.2) Editorial 1300
31548 Perfect Number binary search brute force dp implementation number theory Statement B Codeforces Round 460 (Div. 2) {919} PROGRAMMING Codeforces Round #460 (Div. 2) Editorial 1100
10690 Multiplicity data structures dp implementation math number theory Statement C Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 1700
14555 Divisor Subtraction implementation math number theory Statement B Educational Codeforces Round 54 (Rated for Div. 2) {1076} PROGRAMMING E 1200
273 Fedya the Potter binary search implementation math number theory Statement E Codeforces Round 530 (Div. 1) {1098} PROGRAMMING 64331 3400
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
7823 Trailing Loves (or L'oeufs?) brute force implementation math number theory Statement C Codeforces Round 538 (Div. 2) {1114} PROGRAMMING Codeforces Round #538 (Div. 2) Editorial 1700
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
8510 Koala and Lights implementation math number theory Statement B Codeforces Round 584 - Dasha Code Championship - Elimination Round (rated, open for everyone, Div. 1 + Div. 2) {1209} PROGRAMMING 69791 1300
18314 Adding Powers bitmasks greedy implementation math number theory ternary search Statement C Educational Codeforces Round 83 (Rated for Div. 2) {1312} PROGRAMMING 74640
27280 Yet Another Tetris Problem implementation number theory Statement A Codeforces Round 627 (Div. 3) {1324} PROGRAMMING Codeforces Round #627 (Div. 3) Editorial
19852 Exercising Walk greedy implementation math Statement A Codeforces Round 630 (Div. 2) {1332} PROGRAMMING 500.0 Codeforces Round #630 Editorial 1200
4566 Kate and imperfection greedy implementation math number theory sortings two pointers Statement F Codeforces Round 632 (Div. 2) {1333} PROGRAMMING 2500.0 Codeforces Round #632 (Div. 2) editorial
64005 Maximum GCD brute force greedy implementation number theory Statement A Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 500.0 Editorial — Codeforces Round #651
5523 Asterism (Easy Version) brute force combinatorics implementation math number theory sortings Statement E1 Codeforces Round 654 (Div. 2) {1371} PROGRAMMING 1500.0 Codeforces Round #654 (Div. 2) Editorial
12325 Acacius and String brute force implementation strings Statement A Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 500.0 Codeforces Round #657 Editorial 1500
3494 Decryption bitmasks constructive algorithms implementation math number theory Statement E Codeforces Round 671 (Div. 2) {1419} PROGRAMMING 2250.0 Codeforces Round #671 Editorial
6451 GCD and MST constructive algorithms data structures dsu graphs implementation number theory sortings Statement D Divide by Zero 2021 and Codeforces Round 714 (Div. 2) {1513} PROGRAMMING 2000.0 Divide by Zero 2021 and Codeforces Round #714 (Div. 2) Editorial
20521 Scenes From a Memory brute force implementation math number theory Statement B Codeforces Round 741 (Div. 2) {1562} PROGRAMMING 1000.0 Editorial of Codeforces Round 741 (Div. 2)
5337 Array Stabilization (AND version) binary search brute force graphs greedy implementation math number theory shortest paths Statement F Codeforces Round 744 (Div. 3) {1579} PROGRAMMING Codeforces Round #744 (Div. 3) Editorial
1181 Array Equalizer binary search implementation math number theory sortings Statement E Codeforces Round 754 (Div. 2) {1605} PROGRAMMING 2500.0 tutorial 2400
10435 Complex Market Analysis binary search dp implementation number theory schedules two pointers Statement C Deltix Round, Autumn 2021 (open for everyone, rated, Div. 1 + Div. 2) {1609} PROGRAMMING 1500.0 Deltix Round, Autumn 2021. Editorial 1400
18862 Divide and Multiply greedy implementation math number theory Statement A Deltix Round, Autumn 2021 (open for everyone, rated, Div. 1 + Div. 2) {1609} PROGRAMMING 500.0 Deltix Round, Autumn 2021. Editorial 900
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)
3057 Potion Brewing Class dfs and similar implementation math number theory trees Statement D Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) {1654} PROGRAMMING 2000.0 Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) 2100
3622 Lost Arithmetic Progression combinatorics implementation math number theory Statement D Codeforces Round 785 (Div. 2) {1673} PROGRAMMING 2000.0 Codeforces Round #785 (Div. 2) Editorial
3449 Fibonacci Strings brute force data structures greedy implementation math number theory Statement B Codeforces Round 814 (Div. 1) {1718} PROGRAMMING 1250.0 Codeforces Round #814 (Div. 1, Div. 2) Editorial
17493 Bestie brute force constructive algorithms implementation math number theory Statement A Codeforces Round 830 (Div. 2) {1732} PROGRAMMING 750.0 108327 1000
18595 Make Array Good constructive algorithms implementation number theory sortings Statement B Codeforces Round 838 (Div. 2) {1762} PROGRAMMING 1000.0 Codeforces Round #838 (Div. 2) Editorial
964 Serval and Music Game brute force combinatorics implementation math number theory Statement E Codeforces Round 853 (Div. 2) {1789} PROGRAMMING 2000.0 Codeforces Round #853 (Div. 2) Editorial
2761 MEX of LCM binary search brute force data structures implementation math number theory two pointers Statement E Codeforces Round 879 (Div. 2) {1834} PROGRAMMING 2500.0 Codeforces Round #879 Editorial
24477 We Were Both Children brute force implementation math number theory Statement F Codeforces Round 886 (Div. 4) {1850} PROGRAMMING Codeforces Round #886 (Div. 4) Editorial
12999 The Walkway brute force greedy implementation math number theory Statement B Codeforces Round 893 (Div. 2) {1858} PROGRAMMING 1250.0 Codeforces Round #893 (Div. 2) Editorial 1500
4546 Suspicious logarithms binary search brute force implementation math number theory Statement D Codeforces Round 907 (Div. 2) {1891} PROGRAMMING 1500.0
33081 250 Thousand Tons of TNT brute force implementation number theory Statement B Codeforces Round 909 (Div. 3) {1899} PROGRAMMING Разбор Codeforces Round 909 (Div. 3)
28259 2023 constructive algorithms implementation math number theory Statement A Good Bye 2023 {1916} PROGRAMMING 250.0
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
10151 Final Countdown implementation math number theory Statement E Codeforces Round 927 (Div. 3) {1932} PROGRAMMING 126196
36194 Turtle Math: Fast Three Task implementation number theory Statement B Codeforces Round 929 (Div. 3) {1933} PROGRAMMING Codeforces Round 929 (Div. 3) Editorial
17378 Nearly Shortest Repeating Substring brute force implementation number theory strings Statement E Codeforces Round 937 (Div. 4) {1950} PROGRAMMING Codeforces Round 937 (Div. 4) Editorial
26438 Product of Binary Decimals dp implementation number theory Statement D Codeforces Round 937 (Div. 4) {1950} PROGRAMMING Codeforces Round 937 (Div. 4) Editorial
2955 Chain Reaction data structures dsu greedy implementation math number theory Statement E Educational Codeforces Round 164 (Rated for Div. 2) {1954} PROGRAMMING Educational Codeforces Round 164 Editorial
319 Maximum GCD Sum Queries bitmasks brute force dp implementation number theory Statement F Codeforces Round 945 (Div. 2) {1973} PROGRAMMING 3000.0 Editorial for Codeforces Round #945 (Div. 2) 3100
17321 GCD-sequence greedy implementation math math number theory number theory Statement D Codeforces Round 950 (Div. 3) {1980} PROGRAMMING 130135
9709 Beauty of the mountains brute force data structures implementation math number theory Statement D Codeforces Round 955 (Div. 2, with prizes from NEAR!) {1982} PROGRAMMING 1750.0 130839
19727 Collatz Conjecture brute force implementation math number theory Statement B Codeforces Round 955 (Div. 2, with prizes from NEAR!) {1982} PROGRAMMING 1000.0 130839
10254 Squaring brute force constructive algorithms data structures greedy implementation math number theory Statement C Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 1750.0 Video Tutorial
24642 Circuit greedy implementation math number theory Statement A Codeforces Round 983 (Div. 2) {2032} PROGRAMMING 500.0 Codeforces Round 983 (Div. 2) Editorial
22814 Kevin and Combination Lock brute force implementation math number theory Statement A Codeforces Global Round 28 {2048} PROGRAMMING 250.0 Tutorial
2481 Red Light, Green Light (Hard version) binary search dfs and similar dp dsu graphs implementation number theory Statement D2 Codeforces Round 1030 (Div. 2) {2118} PROGRAMMING 1000.0 Codeforces Round 1030 (Div. 2) Editorial
749 Attraction Theory combinatorics dp implementation math Statement D Codeforces Round 1053 (Div. 1) {2150} PROGRAMMING 2500.0 Editorial of Codeforces Round 1053 (Div. 1, Div. 2)
13422 No Cost Too Great (Easy Version) greedy implementation math number theory Statement C1 Codeforces Round 1060 (Div. 2) {2154} PROGRAMMING 1250.0 Codeforces Round 1060 (Div. 2) Editorial
8453 Removal of a Sequence (Easy Version) binary search bitmasks geometry implementation math number theory Statement D1 Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
2251 Removal of a Sequence (Hard Version) binary search constructive algorithms divide and conquer greedy implementation math number theory probabilities Statement D2 Educational Codeforces Round 184 (Rated for Div. 2) {2169} PROGRAMMING Educational Codeforces Round 184 Editorial
766 RReeppeettiittiioonn binary search brute force implementation math number theory Statement B Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals) {2215} PROGRAMMING 1250.0