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
6790 Fish bitmasks dp probabilities Statement E Codeforces Beta Round 16 (Div. 2 Only) {16} PROGRAMMING Codeforces Beta Round #16 Tutorial 2100
2778 Broken robot dp probabilities Statement D Codeforces Beta Round 24 {24} PROGRAMMING Codeforces Beta Round #24 solutions 2400
1348 Bath Queue combinatorics dp probabilities Statement C Codeforces Beta Round 28 (Codeforces format) {28} PROGRAMMING Codeforces Beta Round #28 (Разбор задач A и B) 2700
2450 Shooting Gallery dp probabilities Statement C Codeforces Beta Round 30 (Codeforces format) {30} PROGRAMMING Codeforces Beta Round #30. Разбор C 1800
744 Bombing binary search dp probabilities Statement D Codeforces Beta Round 47 {50} PROGRAMMING Codeforces #47 problem solutions 2100
1729 First Digit Law dp math probabilities Statement C Codeforces Beta Round 50 {54} PROGRAMMING Codeforces Beta Round #50: Editorial for problem E 2000
540 Half-decay tree data structures divide and conquer dp math probabilities Statement D Codeforces Beta Round 62 {68} PROGRAMMING 2400
570 Help Shrek and Donkey dp games math probabilities Statement E Codeforces Beta Round 78 (Div. 1 Only) {98} PROGRAMMING Editorial 2500
813 Castle dp greedy probabilities sortings trees Statement D Codeforces Beta Round 79 (Div. 1 Only) {101} PROGRAMMING Codeforces Beta Round 79, editoral 2300
4375 Basketball Team combinatorics dp math probabilities Statement B Codeforces Beta Round 83 (Div. 1 Only) {107} PROGRAMMING Tutorial 1700
839 Maze dfs and similar dp probabilities trees Statement E Codeforces Beta Round 92 (Div. 1 Only) {123} PROGRAMMING Codeforces Beta Round #92 - Analysis 2600
9346 Bag of mice dp games math probabilities Statement D Codeforces Round 105 (Div. 2) {148} PROGRAMMING Codeforces Round #105 (Div. 2): editorial 1900
2536 Wizards and Huge Prize dp math probabilities Statement B Codeforces Round 114 (Div. 1) {167} PROGRAMMING Codeforces Round #114 — Tutorial 2000
332 Plane of Tanks: Duel brute force dp math probabilities Statement D Codeforces Round 115 {175} PROGRAMMING Codeforces Round #115 — editorial A-E 2400
519 T-shirt dp greedy probabilities Statement D Croc Champ 2012 - Final {183} PROGRAMMING CROC Champ 2012 — Round 3 (Editorial) 2800
617 Gifts combinatorics dp math probabilities Statement E Codeforces Round 142 (Div. 1) {229} PROGRAMMING Codeforces Round #142 Problem Analysis 2500
4466 Let's Play Osu! dp math probabilities Statement B Codeforces Round 146 (Div. 1) {235} PROGRAMMING Codeforces Round #146 Tutorial 2100
692 Piglet's Birthday dp math probabilities Statement E Codeforces Round 152 (Div. 2) {248} PROGRAMMING Разбор задач Codeforces Round #152 2700
1548 Little Elephant and Broken Sorting dp math probabilities Statement D Codeforces Round 157 (Div. 1) {258} PROGRAMMING Codeforces Round #157 — Editorial 2600
1630 Maxim and Restaurant dp math probabilities Statement B Codeforces Round 160 (Div. 1) {261} PROGRAMMING Codeforces Round #160 tutorial 2100
419 Google Code Jam dp probabilities Statement D Codeforces Round 170 (Div. 1) {277} PROGRAMMING Codeforces Round #170 Tutorial 2700
451 Random Ranking dp math probabilities Statement E Codeforces Round 183 (Div. 1) {303} PROGRAMMING Codeforces Round #183 Editorial 2800
254 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
2777 Jeff and Furik combinatorics dp probabilities Statement B Codeforces Round 204 (Div. 1) {351} PROGRAMMING Codeforces Round #204 — tutorial 2100
1325 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
1213 Painting The Wall dp probabilities Statement B Codeforces Round 233 (Div. 1) {398} PROGRAMMING 1000.0 Codeforces Round #233 Editorial
151 Colored Jenga dfs and similar dp probabilities Statement E Codeforces Round 242 (Div. 2) {424} PROGRAMMING Codeforces Round #242 (Div. 2) Editorial 2500
835 Valera and Number bitmasks dp math probabilities Statement E Codeforces Round 252 (Div. 2) {441} PROGRAMMING Разбор Codeforces Round #252 (Div. 2) 2700
798 World of Darkraft - 2 dp probabilities Statement D Codeforces Round 265 (Div. 1) {464} PROGRAMMING Codeforces Round #265 Editorial 2600
37952 Dreamoon and WiFi bitmasks brute force combinatorics dp math probabilities Statement B Codeforces Round 272 (Div. 2) {476} PROGRAMMING 1300
1022 Game with Strings bitmasks dp probabilities Statement C Codeforces Round 275 (Div. 1) {482} PROGRAMMING Codeforces Round #275 Editorial 2800
990 Helping People dp probabilities Statement C Codeforces Round 282 (Div. 1) {494} PROGRAMMING 15148 2900
1321 Name That Tune dp probabilities two pointers Statement B Codeforces Round 284 (Div. 1) {498} PROGRAMMING Codeforces Round #284 Editorial 2500
736 Inversions problem dp probabilities Statement G2 Rockethon 2015 {513} PROGRAMMING 16260 2400
8429 Ilya and Escalator combinatorics dp math probabilities Statement D Codeforces Round 293 (Div. 2) {518} PROGRAMMING Codeforces Round #293 (Div.2) Editorial 1900
6757 Bad Luck Island dp probabilities Statement D Codeforces Round 301 (Div. 2) {540} PROGRAMMING Tutorial 2100
730 Kyoya and Train dp fft graphs math probabilities Statement E Codeforces Round 309 (Div. 1) {553} PROGRAMMING Codeforces Round #309 Editorial 3300
770 Wilbur and Trees dp math probabilities sortings Statement D Codeforces Round 331 (Div. 2) {596} PROGRAMMING Codeforces Round #331 Editorial 2500
1468 Kleofáš and the n-thlon dp math probabilities Statement C Codeforces Round 333 (Div. 1) {601} PROGRAMMING Codeforces Round #333 — editorial 2400
273 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
3229 Jerry's Protest brute force combinatorics dp probabilities Statement D 8VC Venture Cup 2016 - Elimination Round {626} PROGRAMMING 23522 1800
1204 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
1601 Little Artem and Random Variable dp implementation math probabilities Statement D VK Cup 2016 - Round 2 {641} PROGRAMMING VK Cup 2016 — Раунд 2 (editorial) 2300
755 Bear and Destroying Subtrees dp math probabilities trees Statement E VK Cup 2016 - Round 3 {643} PROGRAMMING VK Cup 2016 — Round 3 — Editorial 2600
1480 LRU bitmasks dp math probabilities Statement C Codeforces Round 363 (Div. 1) {698} PROGRAMMING Solution 2700
2808 Gosha is hunting brute force data structures dp flows math probabilities sortings Statement E Codeforces Round 381 (Div. 1) {739} PROGRAMMING 48582 2900
3532 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
20838 Journey dfs and similar dp graphs probabilities trees Statement C Codeforces Round 428 (Div. 2) {839} PROGRAMMING Codeforces Round #428 editorial 1500
1153 Third Month Insanity dp probabilities trees Statement D MemSQL Start[c]UP 3.0 - Round 1 {859} PROGRAMMING Tutorial 2100
2736 New Year and Arbitrary Arrangement dp math probabilities Statement D Good Bye 2017 {908} PROGRAMMING Good Bye 2017 Editorial 2200
816 Strongly Connected Tournament dp graphs math probabilities Statement F Hello 2018 {913} PROGRAMMING Tutorial 2700
2349 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
333 A Trance of Nightfall dp geometry matrices probabilities Statement E Codeforces Round 487 (Div. 2) {989} PROGRAMMING Codeforces Round #487 (Div. 2) Editorial 2900
2133 Vasya and Magic Matrix dp math probabilities Statement E Codeforces Round 510 (Div. 2) {1042} PROGRAMMING Tutorial 2300
664 Computer Game dp greedy math probabilities Statement D Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!] {1067} PROGRAMMING Tutorial 2800
2133 Inversion Expectation dp math probabilities Statement F Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2300
1358 The Top Scorer combinatorics dp math probabilities Statement E Educational Codeforces Round 57 (Rated for Div. 2) {1096} PROGRAMMING Разбор Educational Codeforces Round 57 2600
3244 Makoto and a Blackboard dp math number theory probabilities Statement D Hello 2019 {1097} PROGRAMMING 64310 2200
2794 Steps to One dp math number theory probabilities Statement D Codeforces Round 548 (Div. 2) {1139} PROGRAMMING Codeforces Round #548 Editorial 2300
1516 Sonya and Informatics combinatorics dp matrices probabilities Statement F Codeforces Round 553 (Div. 2) {1151} PROGRAMMING Codeforces Round #553 (Div. 2) Editorial 2500
1010 Serval and Bonus Problem combinatorics dp math probabilities Statement F Codeforces Round 551 (Div. 2) {1153} PROGRAMMING Editorial 2800
1761 Card Bag dp math probabilities Statement F Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 2500
1259 Nauuo and Pictures (easy version) dp probabilities Statement C1 Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2500
1053 Nauuo and Pictures (hard version) dp probabilities Statement C2 Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2700
1175 Expected Square Beauty dp math probabilities Statement F Educational Codeforces Round 67 (Rated for Div. 2) {1187} PROGRAMMING Разбор Educational Codeforces Round 67 2600
1250 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
1393 Hyakugoku and Ladders dp probabilities shortest paths Statement E Codeforces Round 597 (Div. 2) {1245} PROGRAMMING Codeforces Round #597 (Div. 2) Editorial 2300
1594 Beautiful Bracket Sequence (easy version) combinatorics dp probabilities Statement D1 Codeforces Round 604 (Div. 1) {1264} PROGRAMMING 71995 2600
4654 Beautiful Mirrors data structures dp math probabilities Statement E Codeforces Round 604 (Div. 2) {1265} PROGRAMMING Codeforces Round #604 Editorial 2100
2706 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
1566 Good Contest combinatorics dp probabilities Statement F Educational Codeforces Round 81 (Rated for Div. 2) {1295} PROGRAMMING Educational Codeforces Round 81 Editorial 2600
2108 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
8883 Bargain dp math probabilities Statement C Codeforces Round 675 (Div. 2) {1422} PROGRAMMING 1000.0 Codeforces Round #675 (Div. 2) Editorial
432 School Clubs dp fft math number theory probabilities Statement E Codeforces Round 700 (Div. 1) {1479} PROGRAMMING 4000.0 Editorial of Codeforces Round #700
2537 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
2004 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
2531 Assimilation IV combinatorics dp math probabilities Statement E Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
1172 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)
3067 Tree Array brute force combinatorics dp math probabilities trees Statement B Codeforces Round 728 (Div. 1) {1540} PROGRAMMING 1250.0 Tutorial
1465 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
1493 Robot Cleaner Revisit dp implementation math probabilities Statement D Codeforces Round 763 (Div. 2) {1623} PROGRAMMING 2500.0 Codeforces Round #763 (Div. 2) Editorial
936 Centroid Probabilities combinatorics dp fft math Statement E Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2750.0 Codeforces Round #783 Editorial 3000
1134 Ela Goes Hiking dp probabilities Statement E Dytechlab Cup 2022 {1737} PROGRAMMING 2750.0 Editorial of Dytechlab Cup 2022
5443 Wish I Knew How to Sort dp math probabilities Statement C Codeforces Round 829 (Div. 1) {1753} PROGRAMMING 1750.0 Tutorial 2000
792 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
593 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
1641 Koxia and Tree combinatorics dp math probabilities trees Statement E Good Bye 2022: 2023 is NEAR {1770} PROGRAMMING 2000.0 Good Bye 2022 -- Editorial
560 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
4864 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
3543 Flexible String Revisit combinatorics dp math probabilities Statement D Codeforces Round 848 (Div. 2) {1778} PROGRAMMING 1750.0 Codeforces Round #848 (Div. 2) Editorial
483 Infinite Game combinatorics dp games probabilities Statement E VK Cup 2022 - Финальный раунд (Engine) {1784} PROGRAMMING 3000.0 Codeforces Round #850 Editorial
1377 Random Walk dp graphs math probabilities trees Statement F Codeforces Round 868 (Div. 2) {1823} PROGRAMMING 2500.0 115465
335 Old Mobile dp math probabilities Statement E Codeforces Round 880 (Div. 1) {1835} PROGRAMMING 2250.0 Codeforces Round 880 Editorial
1073 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
1718 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
1953 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)
575 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
1004 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
2235 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
982 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
4920 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
838 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
4090 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
1984 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
4211 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
1484 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
269 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
1491 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
9587 Segments Covering dp probabilities Statement D Educational Codeforces Round 181 (Rated for Div. 2) {2125} PROGRAMMING Educational Codeforces Round 181 Editorial
1915 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
1294 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
431 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
244 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
744 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
195 Fish Fight dp math probabilities Statement F Codeforces Round 1081 (Div. 2) {2192} PROGRAMMING 3000.0 Codeforces Round 1081 (Div. 2) Editorial
1172 Operation Permutation combinatorics dp math probabilities Statement G Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
884 Interval Game bitmasks combinatorics dp games greedy math probabilities Statement F Codeforces Round 1091 (Div. 2) and CodeCraft 26 {2217} PROGRAMMING 2750.0 Tutorial
1438 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
383 Summer Vacation data structures dp probabilities Statement F Educational Codeforces Round 192 (Rated for Div. 2) {2242} PROGRAMMING