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
6592 Fish bitmasks dp probabilities Statement E Codeforces Beta Round 16 (Div. 2 Only) {16} PROGRAMMING Codeforces Beta Round #16 Tutorial 2100
2695 Broken robot dp probabilities Statement D Codeforces Beta Round 24 {24} PROGRAMMING Codeforces Beta Round #24 solutions 2400
1300 Bath Queue combinatorics dp probabilities Statement C Codeforces Beta Round 28 (Codeforces format) {28} PROGRAMMING Codeforces Beta Round #28 (Разбор задач A и B) 2700
2410 Shooting Gallery dp probabilities Statement C Codeforces Beta Round 30 (Codeforces format) {30} PROGRAMMING Codeforces Beta Round #30. Разбор C 1800
709 Bombing binary search dp probabilities Statement D Codeforces Beta Round 47 {50} PROGRAMMING Codeforces #47 problem solutions 2100
1652 First Digit Law dp math probabilities Statement C Codeforces Beta Round 50 {54} PROGRAMMING Codeforces Beta Round #50: Editorial for problem E 2000
532 Half-decay tree data structures divide and conquer dp math probabilities Statement D Codeforces Beta Round 62 {68} PROGRAMMING 2400
562 Help Shrek and Donkey dp games math probabilities Statement E Codeforces Beta Round 78 (Div. 1 Only) {98} PROGRAMMING Editorial 2500
797 Castle dp greedy probabilities sortings trees Statement D Codeforces Beta Round 79 (Div. 1 Only) {101} PROGRAMMING Codeforces Beta Round 79, editoral 2300
4308 Basketball Team combinatorics dp math probabilities Statement B Codeforces Beta Round 83 (Div. 1 Only) {107} PROGRAMMING Tutorial 1700
806 Maze dfs and similar dp probabilities trees Statement E Codeforces Beta Round 92 (Div. 1 Only) {123} PROGRAMMING Codeforces Beta Round #92 - Analysis 2600
9061 Bag of mice dp games math probabilities Statement D Codeforces Round 105 (Div. 2) {148} PROGRAMMING Codeforces Round #105 (Div. 2): editorial 1900
2461 Wizards and Huge Prize dp math probabilities Statement B Codeforces Round 114 (Div. 1) {167} PROGRAMMING Codeforces Round #114 — Tutorial 2000
321 Plane of Tanks: Duel brute force dp math probabilities Statement D Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 2400
481 T-shirt dp greedy probabilities Statement D Croc Champ 2012 - Final {183} PROGRAMMING CROC Champ 2012 — Round 3 (Editorial) 2800
525 Gifts combinatorics dp math probabilities Statement E Codeforces Round 142 (Div. 1) {229} PROGRAMMING Codeforces Round #142 Problem Analysis 2500
4335 Let's Play Osu! dp math probabilities Statement B Codeforces Round 146 (Div. 1) {235} PROGRAMMING Codeforces Round #146 Tutorial 2100
643 Piglet's Birthday dp math probabilities Statement E Codeforces Round 152 (Div. 2) {248} PROGRAMMING Разбор задач Codeforces Round #152 2700
1426 Little Elephant and Broken Sorting dp math probabilities Statement D Codeforces Round 157 (Div. 1) {258} PROGRAMMING Codeforces Round #157 — Editorial 2600
1618 Maxim and Restaurant dp math probabilities Statement B Codeforces Round 160 (Div. 1) {261} PROGRAMMING Codeforces Round #160 tutorial 2100
373 Google Code Jam dp probabilities Statement D Codeforces Round 170 (Div. 1) {277} PROGRAMMING Codeforces Round #170 Tutorial 2700
390 Random Ranking dp math probabilities Statement E Codeforces Round 183 (Div. 1) {303} PROGRAMMING Codeforces Round #183 Editorial 2800
241 Counting Skyscrapers dp math probabilities Statement E MemSQL start[c]up Round 2 - online version {335} PROGRAMMING MemSQL start[c]up Round 2 -- Editorial 2900
2732 Jeff and Furik combinatorics dp probabilities Statement B Codeforces Round 204 (Div. 1) {351} PROGRAMMING Codeforces Round #204 — tutorial 2100
1288 Valera and Fools dfs and similar dp graphs shortest paths Statement D Codeforces Round 216 (Div. 2) {369} PROGRAMMING Editorial Codeforces Round #216 (Div. 2) 2300
1199 Painting The Wall dp probabilities Statement B Codeforces Round 233 (Div. 1) {398} PROGRAMMING 1000.0 Codeforces Round #233 Editorial
149 Colored Jenga dfs and similar dp probabilities Statement E Codeforces Round 242 (Div. 2) {424} PROGRAMMING Codeforces Round #242 (Div. 2) Editorial 2500
823 Valera and Number bitmasks dp math probabilities Statement E Codeforces Round 252 (Div. 2) {441} PROGRAMMING Разбор Codeforces Round #252 (Div. 2) 2700
758 World of Darkraft - 2 dp probabilities Statement D Codeforces Round 265 (Div. 1) {464} PROGRAMMING Codeforces Round #265 Editorial 2600
37337 Dreamoon and WiFi bitmasks brute force combinatorics dp math probabilities Statement B Codeforces Round 272 (Div. 2) {476} PROGRAMMING 1300
995 Game with Strings bitmasks dp probabilities Statement C Codeforces Round 275 (Div. 1) {482} PROGRAMMING Codeforces Round #275 Editorial 2800
960 Helping People dp probabilities Statement C Codeforces Round 282 (Div. 1) {494} PROGRAMMING 15148 2900
1301 Name That Tune dp probabilities two pointers Statement B Codeforces Round 284 (Div. 1) {498} PROGRAMMING Codeforces Round #284 Editorial 2500
727 Inversions problem dp probabilities Statement G2 Rockethon 2015 {513} PROGRAMMING 16260 2400
8250 Ilya and Escalator combinatorics dp math probabilities Statement D Codeforces Round 293 (Div. 2) {518} PROGRAMMING Codeforces Round #293 (Div.2) Editorial 1900
6578 Bad Luck Island dp probabilities Statement D Codeforces Round 301 (Div. 2) {540} PROGRAMMING Tutorial 2100
625 Kyoya and Train dp fft graphs math probabilities Statement E Codeforces Round 309 (Div. 1) {553} PROGRAMMING Codeforces Round #309 Editorial 3300
730 Wilbur and Trees dp math probabilities sortings Statement D Codeforces Round 331 (Div. 2) {596} PROGRAMMING Codeforces Round #331 Editorial 2500
1428 Kleofáš and the n-thlon dp math probabilities Statement C Codeforces Round 333 (Div. 1) {601} PROGRAMMING Codeforces Round #333 — editorial 2400
272 Combining Slimes dp math matrices probabilities Statement G Wunder Fund Round 2016 (Div. 1 + Div. 2 combined) {618} PROGRAMMING Wunder Fund Round 2016 Editorials 3300
3190 Jerry's Protest brute force combinatorics dp probabilities Statement D 8VC Venture Cup 2016 - Elimination Round {626} PROGRAMMING 23522 1800
1170 Famil Door and Roads combinatorics data structures dfs and similar dp probabilities trees Statement E Codeforces Round 343 (Div. 2) {629} PROGRAMMING Editorial of Codeforces Round #343 (Div.2) 2400
1575 Little Artem and Random Variable dp implementation math probabilities Statement D VK Cup 2016 - Round 2 {641} PROGRAMMING VK Cup 2016 — Раунд 2 (editorial) 2300
702 Bear and Destroying Subtrees dp math probabilities trees Statement E VK Cup 2016 - Round 3 {643} PROGRAMMING VK Cup 2016 — Round 3 — Editorial 2600
1445 LRU bitmasks dp math probabilities Statement C Codeforces Round 363 (Div. 1) {698} PROGRAMMING Solution 2700
2657 Gosha is hunting brute force data structures dp flows math probabilities sortings Statement E Codeforces Round 381 (Div. 1) {739} PROGRAMMING 48582 2900
3443 Jon and Orbs dp math probabilities Statement D Divide by Zero 2017 and Codeforces Round 399 (Div. 1 + Div. 2, combined) {768} PROGRAMMING Editorial Divide by Zero and Codeforces Round #399 (Div. 1+2, combined) 2100
20338 Journey dfs and similar dp graphs probabilities trees Statement C Codeforces Round 428 (Div. 2) {839} PROGRAMMING Codeforces Round #428 editorial 1500
1133 Third Month Insanity dp probabilities trees Statement D MemSQL Start[c]UP 3.0 - Round 1 {859} PROGRAMMING Tutorial 2100
2625 New Year and Arbitrary Arrangement dp math probabilities Statement D Good Bye 2017 {908} PROGRAMMING Good Bye 2017 Editorial 2200
773 Strongly Connected Tournament dp graphs math probabilities Statement F Hello 2018 {913} PROGRAMMING Tutorial 2700
2290 Alternating Tree combinatorics dfs and similar divide and conquer dp probabilities trees Statement E 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 2200
282 A Trance of Nightfall dp geometry matrices probabilities Statement E Codeforces Round 487 (Div. 2) {989} PROGRAMMING Codeforces Round #487 (Div. 2) Editorial 2900
2088 Vasya and Magic Matrix dp math probabilities Statement E Codeforces Round 510 (Div. 2) {1042} PROGRAMMING Tutorial 2300
491 Computer Game dp greedy math probabilities Statement D Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!] {1067} PROGRAMMING Tutorial 2800
2075 Inversion Expectation dp math probabilities Statement F Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2300
1286 The Top Scorer combinatorics dp math probabilities Statement E Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2600
3201 Makoto and a Blackboard dp math number theory probabilities Statement D Hello 2019 {1097} PROGRAMMING 64310 2200
2712 Steps to One dp math number theory probabilities Statement D Codeforces Round 548 (Div. 2) {1139} PROGRAMMING Codeforces Round #548 Editorial 2300
1464 Sonya and Informatics combinatorics dp matrices probabilities Statement F Codeforces Round 553 (Div. 2) {1151} PROGRAMMING Codeforces Round #553 (Div. 2) Editorial 2500
933 Serval and Bonus Problem combinatorics dp math probabilities Statement F Codeforces Round 551 (Div. 2) {1153} PROGRAMMING Editorial 2800
1723 Card Bag dp math probabilities Statement F Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 2500
1231 Nauuo and Pictures (easy version) dp probabilities Statement C1 Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2500
1001 Nauuo and Pictures (hard version) dp probabilities Statement C2 Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2700
1124 Expected Square Beauty dp math probabilities Statement F Educational Codeforces Round 67 (Rated for Div. 2) {1187} PROGRAMMING Разбор Educational Codeforces Round 67 2600
1223 Crossword Expert combinatorics dp number theory probabilities two pointers Statement F Educational Codeforces Round 68 (Rated for Div. 2) {1194} PROGRAMMING Разбор Educational Codeforces Round 68 2500
1371 Hyakugoku and Ladders dp probabilities shortest paths Statement E Codeforces Round 597 (Div. 2) {1245} PROGRAMMING Codeforces Round #597 (Div. 2) Editorial 2300
1542 Beautiful Bracket Sequence (easy version) combinatorics dp probabilities Statement D1 Codeforces Round 604 (Div. 1) {1264} PROGRAMMING 71995 2600
4563 Beautiful Mirrors data structures dp math probabilities Statement E Codeforces Round 604 (Div. 2) {1265} PROGRAMMING Codeforces Round #604 Editorial 2100
2529 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
1511 Good Contest combinatorics dp probabilities Statement F Educational Codeforces Round 81 (Rated for Div. 2) {1295} PROGRAMMING Educational Codeforces Round 81 Editorial 2600
2059 Tourism brute force dp graphs probabilities Statement D VK Cup 2019-2020 - Elimination Round (Engine) {1310} PROGRAMMING 2250.0 VK Cup 2019-2020 - Elimination Round (Engine) and Codeforces Round #623 2300
8854 Bargain dp math probabilities Statement C Codeforces Round 675 (Div. 2) {1422} PROGRAMMING 1000.0 Codeforces Round #675 (Div. 2) Editorial
266 School Clubs dp fft math number theory probabilities Statement E Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 4000.0 Editorial of Codeforces Round #700
2491 Love-Hate bitmasks brute force dp probabilities Statement D Deltix Round, Spring 2021 (open for everyone, rated, Div. 1 + Div. 2) {1523} PROGRAMMING 2250.0 Deltix Round, Spring 2021. Editorial 2400
1946 Crypto Lights combinatorics dp probabilities Statement E Deltix Round, Spring 2021 (open for everyone, rated, Div. 1 + Div. 2) {1523} PROGRAMMING 2250.0 Deltix Round, Spring 2021. Editorial 2600
2459 Assimilation IV combinatorics dp math probabilities Statement E Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
1000 Bingo bitmasks dp probabilities Statement F Codeforces Round 733 (Div. 1 + Div. 2, based on VK Cup 2021 - Elimination (Engine)) {1530} PROGRAMMING 2750.0 Codeforces Round #733 Editorial (all problems)
3003 Tree Array brute force combinatorics dp math probabilities trees Statement B Codeforces Round 728 (Div. 1) {1540} PROGRAMMING 1250.0 Tutorial
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
1474 Robot Cleaner Revisit dp implementation math probabilities Statement D Codeforces Round 763 (Div. 2) {1623} PROGRAMMING 2500.0 Codeforces Round #763 (Div. 2) Editorial
816 Centroid Probabilities combinatorics dp fft math Statement E Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2750.0 Codeforces Round #783 Editorial 3000
1080 Ela Goes Hiking dp probabilities Statement E Dytechlab Cup 2022 {1737} PROGRAMMING 2750.0 Editorial of Dytechlab Cup 2022
5310 Wish I Knew How to Sort dp math probabilities Statement C Codeforces Round 829 (Div. 1) {1753} PROGRAMMING 1750.0 Tutorial 2000
763 Chemistry Lab dp geometry probabilities Statement F 2022-2023 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Preferably Teams) {1765} PROGRAMMING 109642 2200
558 Card Guessing dp probabilities Statement C 2022-2023 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Preferably Teams) {1765} PROGRAMMING 109642 2600
1614 Koxia and Tree combinatorics dp math probabilities trees Statement E Good Bye 2022: 2023 is NEAR {1770} PROGRAMMING 2000.0 Good Bye 2022 -- Editorial
556 Game of Questions bitmasks dp math probabilities Statement G 2022-2023 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1773} PROGRAMMING 2800
4750 Score of a Tree bitmasks combinatorics dfs and similar dp probabilities trees Statement D Codeforces Round 845 (Div. 2) and ByteRace 2023 {1777} PROGRAMMING 2000.0 Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial
3450 Flexible String Revisit combinatorics dp math probabilities Statement D Codeforces Round 848 (Div. 2) {1778} PROGRAMMING 1750.0 Codeforces Round #848 (Div. 2) Editorial
464 Infinite Game combinatorics dp games probabilities Statement E VK Cup 2022 - Финальный раунд (Engine) {1784} PROGRAMMING 3000.0 Codeforces Round #850 Editorial
1302 Random Walk dp graphs math probabilities trees Statement F Codeforces Round 868 (Div. 2) {1823} PROGRAMMING 2500.0 115465
281 Old Mobile dp math probabilities Statement E Codeforces Round 880 (Div. 1) {1835} PROGRAMMING 2250.0 Codeforces Round 880 Editorial
861 Tenzing and Random Real Numbers 2-sat bitmasks dp probabilities Statement H CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) {1842} PROGRAMMING 3750.0 CodeTON Round 5 Editorial
1611 Tenzing and Random Operations combinatorics dp math probabilities Statement G CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) {1842} PROGRAMMING 3000.0 CodeTON Round 5 Editorial
1799 Expected Destruction dp math probabilities Statement C Codeforces Round 889 (Div. 1) {1854} PROGRAMMING 1500.0 Editorial of Codeforces Round 889 (Div. 1 + Div. 2)
496 Asterism Stream dp math matrices probabilities Statement H Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) {1864} PROGRAMMING 3500.0 Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) Editorial
978 Mighty Rock Tower combinatorics dp math probabilities Statement M COMPFEST 15 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1866} PROGRAMMING COMPFEST 15 Preliminary — Editorial
2202 Jellyfish and EVA dp graphs greedy math probabilities Statement C Codeforces Round 901 (Div. 1) {1874} PROGRAMMING 1500.0 Codeforces Round 901 (Div. 1, Div. 2) Editorial
947 Jellyfish and Miku dp math probabilities Statement D Codeforces Round 901 (Div. 1) {1874} PROGRAMMING 2250.0 Codeforces Round 901 (Div. 1, Div. 2) Editorial
4819 Good Trip combinatorics dp math probabilities Statement D Codeforces Round 921 (Div. 2) {1925} PROGRAMMING 1750.0 Codeforces Round 921 (Div. 1, Div. 2) Editorial
810 Turtle and Three Sequences data structures dp graphs greedy meet-in-the-middle probabilities two pointers Statement F Codeforces Round 968 (Div. 2) {2003} PROGRAMMING 2500.0 sol-zh.pdf
4010 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
1924 Alice's Adventures in the Rabbit Hole constructive algorithms dfs and similar dp greedy math probabilities trees Statement E Codeforces Round 986 (Div. 2) {2028} PROGRAMMING 2000.0 Codeforces Round 986 (Div. 2) Editorial
4122 Math Division bitmasks dp math probabilities Statement A Codeforces Round 1010 (Div. 1, Unrated) {2081} PROGRAMMING 500.0 Codeforces Round 1010 (Div. 1, Div. 2, based on Zhili Cup 2025) Editorial
1468 Key of Like (Easy Version) dp math probabilities Statement C1 Codeforces Round 1012 (Div. 1) {2089} PROGRAMMING 1000.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
263 Key of Like (Hard Version) dp math probabilities Statement C2 Codeforces Round 1012 (Div. 1) {2089} PROGRAMMING 1250.0 Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial
971 Gellyfish and Eternal Violet combinatorics dp greedy math meet-in-the-middle probabilities Statement C Codeforces Round 1028 (Div. 1) {2115} PROGRAMMING 1750.0 Codeforces Round 1028 (Div.1, Div.2) Editorial
9392 Segments Covering dp probabilities Statement D Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
853 23 Rises Again brute force data structures dfs and similar dp flows graphs implementation probabilities trees Statement H Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 4000.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
1252 Prime Gaming (Hard Version) bitmasks combinatorics dp probabilities Statement E2 Codeforces Round 1049 (Div. 2) {2140} PROGRAMMING 1000.0 Codeforces Round 1049 (Div. 2) Editorial
410 Control Car (Easy Version) combinatorics dp probabilities Statement F1 Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 2500.0 Codeforces Global Round 31
229 Control Car (Hard Version) combinatorics dp probabilities Statement F2 Codeforces Global Round 31 (Div. 1 + Div. 2) {2180} PROGRAMMING 750.0 Codeforces Global Round 31
721 Jinx or Jackpot brute force dp math probabilities Statement J 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
179 Fish Fight dp math probabilities Statement F Codeforces Round 1081 (Div. 2) {2192} PROGRAMMING 3000.0 Codeforces Round 1081 (Div. 2) Editorial
1089 Operation Permutation combinatorics dp math probabilities Statement G Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
814 Interval Game bitmasks combinatorics dp games greedy math probabilities Statement F Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 2750.0 Tutorial
1303 Coloring a Red Black Tree dp greedy probabilities trees Statement C Codeforces Round 1093 (Div. 1) {2219} PROGRAMMING 1750.0 Codeforces Round 1093 (Div. 1, Div. 2) Editorial