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
6504 Fish bitmasks dp probabilities Statement E Codeforces Beta Round 16 (Div. 2 Only) {16} PROGRAMMING Codeforces Beta Round #16 Tutorial 2100
2626 Broken robot dp probabilities Statement D Codeforces Beta Round 24 {24} PROGRAMMING Codeforces Beta Round #24 solutions 2400
1271 Bath Queue combinatorics dp probabilities Statement C Codeforces Beta Round 28 (Codeforces format) {28} PROGRAMMING Codeforces Beta Round #28 (Разбор задач A и B) 2700
2363 Shooting Gallery dp probabilities Statement C Codeforces Beta Round 30 (Codeforces format) {30} PROGRAMMING Codeforces Beta Round #30. Разбор C 1800
705 Bombing binary search dp probabilities Statement D Codeforces Beta Round 47 {50} PROGRAMMING Codeforces #47 problem solutions 2100
1627 First Digit Law dp math probabilities Statement C Codeforces Beta Round 50 {54} PROGRAMMING Codeforces Beta Round #50: Editorial for problem E 2000
531 Half-decay tree data structures divide and conquer dp math probabilities Statement D Codeforces Beta Round 62 {68} PROGRAMMING 2400
558 Help Shrek and Donkey dp games math probabilities Statement E Codeforces Beta Round 78 (Div. 1 Only) {98} PROGRAMMING Editorial 2500
790 Castle dp greedy probabilities sortings trees Statement D Codeforces Beta Round 79 (Div. 1 Only) {101} PROGRAMMING Codeforces Beta Round 79, editoral 2300
4243 Basketball Team combinatorics dp math probabilities Statement B Codeforces Beta Round 83 (Div. 1 Only) {107} PROGRAMMING Tutorial 1700
802 Maze dfs and similar dp probabilities trees Statement E Codeforces Beta Round 92 (Div. 1 Only) {123} PROGRAMMING Codeforces Beta Round #92 - Analysis 2600
8845 Bag of mice dp games math probabilities Statement D Codeforces Round 105 (Div. 2) {148} PROGRAMMING Codeforces Round #105 (Div. 2): editorial 1900
2443 Wizards and Huge Prize dp math probabilities Statement B Codeforces Round 114 (Div. 1) {167} PROGRAMMING Codeforces Round #114 — Tutorial 2000
317 Plane of Tanks: Duel brute force dp math probabilities Statement D Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 2400
480 T-shirt dp greedy probabilities Statement D Croc Champ 2012 - Final {183} PROGRAMMING CROC Champ 2012 — Round 3 (Editorial) 2800
524 Gifts combinatorics dp math probabilities Statement E Codeforces Round 142 (Div. 1) {229} PROGRAMMING Codeforces Round #142 Problem Analysis 2500
4285 Let's Play Osu! dp math probabilities Statement B Codeforces Round 146 (Div. 1) {235} PROGRAMMING Codeforces Round #146 Tutorial 2100
639 Piglet's Birthday dp math probabilities Statement E Codeforces Round 152 (Div. 2) {248} PROGRAMMING Разбор задач Codeforces Round #152 2700
1414 Little Elephant and Broken Sorting dp math probabilities Statement D Codeforces Round 157 (Div. 1) {258} PROGRAMMING Codeforces Round #157 — Editorial 2600
1600 Maxim and Restaurant dp math probabilities Statement B Codeforces Round 160 (Div. 1) {261} PROGRAMMING Codeforces Round #160 tutorial 2100
372 Google Code Jam dp probabilities Statement D Codeforces Round 170 (Div. 1) {277} PROGRAMMING Codeforces Round #170 Tutorial 2700
383 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
2721 Jeff and Furik combinatorics dp probabilities Statement B Codeforces Round 204 (Div. 1) {351} PROGRAMMING Codeforces Round #204 — tutorial 2100
1283 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
1186 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
815 Valera and Number bitmasks dp math probabilities Statement E Codeforces Round 252 (Div. 2) {441} PROGRAMMING Разбор Codeforces Round #252 (Div. 2) 2700
756 World of Darkraft - 2 dp probabilities Statement D Codeforces Round 265 (Div. 1) {464} PROGRAMMING Codeforces Round #265 Editorial 2600
36817 Dreamoon and WiFi bitmasks brute force combinatorics dp math probabilities Statement B Codeforces Round 272 (Div. 2) {476} PROGRAMMING 1300
991 Game with Strings bitmasks dp probabilities Statement C Codeforces Round 275 (Div. 1) {482} PROGRAMMING Codeforces Round #275 Editorial 2800
956 Helping People dp probabilities Statement C Codeforces Round 282 (Div. 1) {494} PROGRAMMING 15148 2900
1294 Name That Tune dp probabilities two pointers Statement B Codeforces Round 284 (Div. 1) {498} PROGRAMMING Codeforces Round #284 Editorial 2500
722 Inversions problem dp probabilities Statement G2 Rockethon 2015 {513} PROGRAMMING 16260 2400
8129 Ilya and Escalator combinatorics dp math probabilities Statement D Codeforces Round 293 (Div. 2) {518} PROGRAMMING Codeforces Round #293 (Div.2) Editorial 1900
6474 Bad Luck Island dp probabilities Statement D Codeforces Round 301 (Div. 2) {540} PROGRAMMING Tutorial 2100
620 Kyoya and Train dp fft graphs math probabilities Statement E Codeforces Round 309 (Div. 1) {553} PROGRAMMING Codeforces Round #309 Editorial 3300
728 Wilbur and Trees dp math probabilities sortings Statement D Codeforces Round 331 (Div. 2) {596} PROGRAMMING Codeforces Round #331 Editorial 2500
1411 Kleofáš and the n-thlon dp math probabilities Statement C Codeforces Round 333 (Div. 1) {601} PROGRAMMING Codeforces Round #333 — editorial 2400
271 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
3146 Jerry's Protest brute force combinatorics dp probabilities Statement D 8VC Venture Cup 2016 - Elimination Round {626} PROGRAMMING 23522 1800
1148 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
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
698 Bear and Destroying Subtrees dp math probabilities trees Statement E VK Cup 2016 - Round 3 {643} PROGRAMMING VK Cup 2016 — Round 3 — Editorial 2600
1439 LRU bitmasks dp math probabilities Statement C Codeforces Round 363 (Div. 1) {698} PROGRAMMING Solution 2700
2617 Gosha is hunting brute force data structures dp flows math probabilities sortings Statement E Codeforces Round 381 (Div. 1) {739} PROGRAMMING 48582 2900
3417 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
20001 Journey dfs and similar dp graphs probabilities trees Statement C Codeforces Round 428 (Div. 2) {839} PROGRAMMING Codeforces Round #428 editorial 1500
1121 Third Month Insanity dp probabilities trees Statement D MemSQL Start[c]UP 3.0 - Round 1 {859} PROGRAMMING Tutorial 2100
2600 New Year and Arbitrary Arrangement dp math probabilities Statement D Good Bye 2017 {908} PROGRAMMING Good Bye 2017 Editorial 2200
764 Strongly Connected Tournament dp graphs math probabilities Statement F Hello 2018 {913} PROGRAMMING Tutorial 2700
2264 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
278 A Trance of Nightfall dp geometry matrices probabilities Statement E Codeforces Round 487 (Div. 2) {989} PROGRAMMING Codeforces Round #487 (Div. 2) Editorial 2900
2077 Vasya and Magic Matrix dp math probabilities Statement E Codeforces Round 510 (Div. 2) {1042} PROGRAMMING Tutorial 2300
490 Computer Game dp greedy math probabilities Statement D Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!] {1067} PROGRAMMING Tutorial 2800
2057 Inversion Expectation dp math probabilities Statement F Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2300
1277 The Top Scorer combinatorics dp math probabilities Statement E Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2600
3163 Makoto and a Blackboard dp math number theory probabilities Statement D Hello 2019 {1097} PROGRAMMING 64310 2200
2694 Steps to One dp math number theory probabilities Statement D Codeforces Round 548 (Div. 2) {1139} PROGRAMMING Codeforces Round #548 Editorial 2300
1452 Sonya and Informatics combinatorics dp matrices probabilities Statement F Codeforces Round 553 (Div. 2) {1151} PROGRAMMING Codeforces Round #553 (Div. 2) Editorial 2500
929 Serval and Bonus Problem combinatorics dp math probabilities Statement F Codeforces Round 551 (Div. 2) {1153} PROGRAMMING Editorial 2800
1712 Card Bag dp math probabilities Statement F Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 2500
1225 Nauuo and Pictures (easy version) dp probabilities Statement C1 Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2500
995 Nauuo and Pictures (hard version) dp probabilities Statement C2 Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2700
1110 Expected Square Beauty dp math probabilities Statement F Educational Codeforces Round 67 (Rated for Div. 2) {1187} PROGRAMMING Разбор Educational Codeforces Round 67 2600
1207 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
1364 Hyakugoku and Ladders dp probabilities shortest paths Statement E Codeforces Round 597 (Div. 2) {1245} PROGRAMMING Codeforces Round #597 (Div. 2) Editorial 2300
1524 Beautiful Bracket Sequence (easy version) combinatorics dp probabilities Statement D1 Codeforces Round 604 (Div. 1) {1264} PROGRAMMING 71995 2600
4492 Beautiful Mirrors data structures dp math probabilities Statement E Codeforces Round 604 (Div. 2) {1265} PROGRAMMING Codeforces Round #604 Editorial 2100
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
1507 Good Contest combinatorics dp probabilities Statement F Educational Codeforces Round 81 (Rated for Div. 2) {1295} PROGRAMMING Educational Codeforces Round 81 Editorial 2600
1964 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
8802 Bargain dp math probabilities Statement C Codeforces Round 675 (Div. 2) {1422} PROGRAMMING 1000.0 Codeforces Round #675 (Div. 2) 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
2469 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
1919 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
2365 Assimilation IV combinatorics dp math probabilities Statement E Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
985 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)
2983 Tree Array brute force combinatorics dp math probabilities trees Statement B Codeforces Round 728 (Div. 1) {1540} PROGRAMMING 1250.0 Tutorial
1415 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
1467 Robot Cleaner Revisit dp implementation math probabilities Statement D Codeforces Round 763 (Div. 2) {1623} PROGRAMMING 2500.0 Codeforces Round #763 (Div. 2) Editorial
803 Centroid Probabilities combinatorics dp fft math Statement E Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2750.0 Codeforces Round #783 Editorial 3000
1074 Ela Goes Hiking dp probabilities Statement E Dytechlab Cup 2022 {1737} PROGRAMMING 2750.0 Editorial of Dytechlab Cup 2022
5255 Wish I Knew How to Sort dp math probabilities Statement C Codeforces Round 829 (Div. 1) {1753} PROGRAMMING 1750.0 Tutorial 2000
758 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
551 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
1607 Koxia and Tree combinatorics dp math probabilities trees Statement E Good Bye 2022: 2023 is NEAR {1770} PROGRAMMING 2000.0 Good Bye 2022 -- Editorial
545 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
4660 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
3388 Flexible String Revisit combinatorics dp math probabilities Statement D Codeforces Round 848 (Div. 2) {1778} PROGRAMMING 1750.0 Codeforces Round #848 (Div. 2) Editorial
461 Infinite Game combinatorics dp games probabilities Statement E VK Cup 2022 - Финальный раунд (Engine) {1784} PROGRAMMING 3000.0 Codeforces Round #850 Editorial
1283 Random Walk dp graphs math probabilities trees Statement F Codeforces Round 868 (Div. 2) {1823} PROGRAMMING 2500.0 115465
274 Old Mobile dp math probabilities Statement E Codeforces Round 880 (Div. 1) {1835} PROGRAMMING 2250.0 Codeforces Round 880 Editorial
850 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
1568 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
1777 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)
492 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
967 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
2169 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
927 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
4756 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
798 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
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
1892 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
4053 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
1400 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
254 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
903 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
9218 Segments Covering dp probabilities Statement D Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
565 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
1225 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
401 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
221 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
697 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
165 Fish Fight dp math probabilities Statement F Codeforces Round 1081 (Div. 2) {2192} PROGRAMMING 3000.0 Codeforces Round 1081 (Div. 2) Editorial
970 Operation Permutation combinatorics dp math probabilities Statement G Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
589 Interval Game bitmasks combinatorics dp games greedy math probabilities Statement F Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 2750.0
918 Coloring a Red Black Tree dp greedy probabilities trees Statement C Codeforces Round 1093 (Div. 1) {2219} PROGRAMMING 1750.0