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
17984 Longest Regular Bracket Sequence constructive algorithms data structures dp greedy sortings strings Statement C Codeforces Beta Round 5 {5} PROGRAMMING C, D и E с CBR5 - разбор 1900
1096 Zebra Tower *special data structures greedy sortings Statement E VK Cup 2012 Qualification Round 2 {159} PROGRAMMING Simple solution to vk cup Qualification Round 1 and 2 2100
39193 Little Girl and Maximum Sum data structures greedy implementation sortings Statement C Codeforces Round 169 (Div. 2) {276} PROGRAMMING Codeforces Round #169 — Unofficial Editorial 1600
514 Optimizer data structures greedy sortings Statement B Testing Round 6 {306} PROGRAMMING 2000
1027 Students' Revenge data structures greedy sortings Statement C Codeforces Round 193 (Div. 2) {332} PROGRAMMING 8447 2200
2446 Preparing for the Contest binary search data structures greedy sortings Statement B Codeforces Round 222 (Div. 1) {377} PROGRAMMING Codeforces Round #222 — Problem Analysis 2100
6054 Misha and Forest constructive algorithms data structures greedy sortings trees Statement C Codeforces Round 285 (Div. 2) {501} PROGRAMMING Tutorial 1700
5078 Clique Problem data structures dp greedy implementation sortings Statement D Codeforces Round 296 (Div. 2) {527} PROGRAMMING Codeforces Round #296 Editorial 2100
4077 Case of Fugitive data structures greedy sortings Statement B Codeforces Round 310 (Div. 1) {555} PROGRAMMING Codeforces Round #310 Editorial 2100
4209 Arthur and Table brute force data structures dp greedy math sortings Statement C Codeforces Round 311 (Div. 2) {557} PROGRAMMING Codeforces Round #311 (Div.2) Editorial 1900
5234 One-Dimensional Battle Ships binary search data structures greedy sortings Statement D Codeforces Round #Pi (Div. 2) {567} PROGRAMMING Editorial Codeforces Round #Pi 1800
8080 Order Book data structures greedy implementation sortings Statement B Codeforces Round 317 [AimFund Thanks-Round] (Div. 2) {572} PROGRAMMING Codeforces Round #317 [AimFund Thanks-Round] Editorial 1400
904 New Year and Three Musketeers data structures greedy sortings Statement E Good Bye 2015 {611} PROGRAMMING Tutorial 2300
1063 Bear and Contribution data structures greedy sortings Statement D VK Cup 2016 - Round 1 {639} PROGRAMMING Tutorial 2500
156 Автобус binary search data structures greedy sortings Statement E Технокубок 2016 - Отборочный Раунд 2 {649} PROGRAMMING 2500.0 2100
3855 Money Transfers constructive algorithms data structures greedy sortings Statement C Codeforces Round 353 (Div. 2) {675} PROGRAMMING Tutorial 2000
2386 Subordinates constructive algorithms data structures graphs greedy sortings Statement E Technocup 2017 - Elimination Round 2 {729} PROGRAMMING Technocup 2017 — Elimination Round 2 (and Codeforces Round 380) Editorial 2000
1277 80-th Level Archeology brute force data structures greedy sortings Statement D Codeforces Round 376 (Div. 2) {731} PROGRAMMING 47840 2200
2685 Fedor and coupons binary search data structures greedy sortings Statement D Codeforces Round 390 (Div. 2) {754} PROGRAMMING 2000
12865 PolandBall and Game binary search data structures games greedy sortings strings Statement B 8VC Venture Cup 2017 - Elimination Round {755} PROGRAMMING 8VC Venture Cup 2017 — Elimination Round [Editorial] 1200
2411 Cartons of milk binary search data structures greedy sortings two pointers Statement D Codeforces Round 398 (Div. 2) {767} PROGRAMMING Codeforces Round #398 (Div. 2) Editorial 2000
9960 Game of Credit Cards data structures dp greedy sortings Statement B Codeforces Round 401 (Div. 2) {777} PROGRAMMING Problem analysis of Codeforces Round #401 (Div. 2) 1300
4737 Hanoi Factory brute force data structures dp greedy sortings Statement E Codeforces Round 401 (Div. 2) {777} PROGRAMMING Problem analysis of Codeforces Round #401 (Div. 2) 2000
1462 Mice and Holes data structures dp greedy sortings Statement F Educational Codeforces Round 19 {797} PROGRAMMING 51588 2600
4320 String Reconstruction data structures greedy sortings strings Statement A Codeforces Round 423 (Div. 1, rated, based on VK Cup Finals) {827} PROGRAMMING Codeforces Round #423 Analysis 1700
13623 Two TVs data structures greedy sortings Statement C Educational Codeforces Round 27 {845} PROGRAMMING 53986 1500
5125 Too Easy Problems binary search brute force data structures greedy sortings Statement D Hello 2018 {913} PROGRAMMING Tutorial 1800
12283 Minimize the error data structures greedy sortings Statement B 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 1500
2049 Leaving the Bar brute force data structures geometry greedy math sortings Statement C Codeforces Round 492 (Div. 1) [Thanks, uDebug!] {995} PROGRAMMING Editorial for Codeforces Round #492 [Thanks u-Debug!] 2200
1466 Leaf Sets data structures dfs and similar dsu graphs greedy sortings trees Statement F Codeforces Round 510 (Div. 2) {1042} PROGRAMMING Tutorial 2400
2558 TV Shows data structures greedy implementation sortings Statement D Codeforces Round 523 (Div. 2) {1061} PROGRAMMING Tutorial (en) 2000
1086 New Year and the Acquaintance Estimation binary search data structures graphs greedy implementation math sortings Statement E Good Bye 2018 {1091} PROGRAMMING Editorial 2400
2114 Permutation recovery constructive algorithms data structures dfs and similar graphs greedy math sortings Statement C Codeforces Round 559 (Div. 1) {1158} PROGRAMMING 66993 2300
24125 Polycarp Training data structures greedy sortings Statement B Codeforces Round 560 (Div. 3) {1165} PROGRAMMING Codeforces Round #560 (Div. 3) Editorial 1000
493 Adilbek and the Watering System data structures greedy sortings Statement G Educational Codeforces Round 74 (Rated for Div. 2) {1238} PROGRAMMING Educational Codeforces Round 74 Editorial 2700
5760 Too Many Segments (hard version) data structures greedy sortings Statement D2 Codeforces Round 595 (Div. 3) {1249} PROGRAMMING Codeforces Round #595 (Div. 3) Editorial 2000
3057 Antenna Coverage data structures dp greedy sortings Statement E Codeforces Round 600 (Div. 2) {1253} PROGRAMMING Editorial 2200
8144 Yet Another Monster Killing Problem binary search data structures dp greedy sortings two pointers Statement D Educational Codeforces Round 76 (Rated for Div. 2) {1257} PROGRAMMING Educational Codeforces Round 76 Editorial 1700
3395 Portals data structures dp greedy implementation sortings Statement D Codeforces Round 608 (Div. 2) {1271} PROGRAMMING 72247 2100
127 Movie Fan *special data structures greedy implementation sortings Statement F Kotlin Heroes: Episode 3 {1297} PROGRAMMING Kotlin Heroes: Episode 3 Editorial
7159 Cow and Fields binary search data structures dfs and similar graphs greedy shortest paths sortings Statement D Codeforces Round 621 (Div. 1 + Div. 2) {1307} PROGRAMMING 2000.0 Codeforces Round #621 (Div. 1 + Div. 2) Editorial 1900
5577 Recommendations data structures greedy sortings Statement A VK Cup 2019-2020 - Elimination Round (Engine) {1310} PROGRAMMING 500.0 VK Cup 2019-2020 - Elimination Round (Engine) and Codeforces Round #623 1700
1802 Drazil Likes Heap constructive algorithms data structures greedy implementation sortings Statement C Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov! {1329} PROGRAMMING 1500.0 Codeforces Round #631 Editorial 2400
6362 Multiple Testcases binary search constructive algorithms data structures greedy sortings two pointers Statement D Educational Codeforces Round 86 (Rated for Div. 2) {1342} PROGRAMMING 76633 1900
2450 DeadLee constructive algorithms data structures graphs greedy implementation sortings Statement E Codeforces Round 652 (Div. 2) {1369} PROGRAMMING 2500.0 Codeforces Round #652 (Div. 2) Editorial 2400
1063 Reading Books (hard version) binary search data structures greedy sortings ternary search two pointers Statement E2 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
14943 Reading Books (easy version) data structures greedy implementation sortings Statement E1 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
6072 Choosing flowers binary search data structures greedy math sortings two pointers Statement C Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 1250.0 Codeforces Round #657 Editorial 2000
1240 Bicolored Segments data structures dp graph matchings greedy sortings Statement F Educational Codeforces Round 92 (Rated for Div. 2) {1389} PROGRAMMING 80809
11042 Pinkie Pie Eats Patty-cakes binary search constructive algorithms data structures greedy math sortings Statement C Codeforces Round 662 (Div. 2) {1393} PROGRAMMING 1500.0 Codeforces Round #662 Editorial
2592 Two Types of Spells binary search data structures greedy implementation math sortings Statement E Educational Codeforces Round 93 (Rated for Div. 2) {1398} PROGRAMMING Educational Codeforces Round 93 Editorial
8371 The Treasure of The Segments binary search data structures greedy sortings Statement F Codeforces Round 690 (Div. 3) {1462} PROGRAMMING Codeforces Round #690 (Div. 3) Editorial
14107 Array Destruction constructive algorithms data structures greedy implementation sortings Statement C Codeforces Round 696 (Div. 2) {1474} PROGRAMMING 1500.0 Codeforces Round #696 Editorial
18297 Equalize the Array binary search data structures greedy math sortings Statement F Codeforces Round 702 (Div. 3) {1490} PROGRAMMING Codeforces Round #702 (Div. 3) Editorial
26017 Meximization brute force data structures greedy sortings Statement A Codeforces Round 708 (Div. 2) {1497} PROGRAMMING 500.0 Codeforces Round #708 Editorial 800
3838 Travelling Salesman Problem binary search data structures dp greedy shortest paths sortings Statement C Codeforces Round 712 (Div. 1) {1503} PROGRAMMING 1250.0 T 2200
1255 Flip the Cards 2-sat constructive algorithms data structures dsu greedy sortings Statement D Codeforces Round 712 (Div. 1) {1503} PROGRAMMING 1750.0 T 2600
4803 Cut and Stick binary search data structures greedy probabilities sortings Statement D Codeforces Round 716 (Div. 2) {1514} PROGRAMMING 2000.0 Codeforces round #716 editorial
4809 Robot Collisions data structures greedy implementation sortings Statement C Educational Codeforces Round 109 (Rated for Div. 2) {1525} PROGRAMMING 90793
12703 PriceFixed binary search data structures greedy sortings two pointers Statement D Codeforces Round 727 (Div. 2) {1539} PROGRAMMING 1500.0 tutorial 1600
982 Strange Array data structures greedy sortings Statement F Codeforces Round 727 (Div. 2) {1539} PROGRAMMING 2500.0 tutorial 2600
2122 Colors and Intervals constructive algorithms data structures greedy sortings Statement E Codeforces Global Round 15 {1552} PROGRAMMING 1500.0 Editorial of Global Round 15
8327 Seating Arrangements (hard version) data structures greedy implementation sortings two pointers Statement D2 Codeforces Global Round 16 {1566} PROGRAMMING 1000.0 Codeforces Global Round 16 Editorial
14705 Seating Arrangements (easy version) data structures greedy sortings Statement D1 Codeforces Global Round 16 {1566} PROGRAMMING 750.0 Codeforces Global Round 16 Editorial
2335 Optimal Insertion data structures divide and conquer greedy sortings Statement C Codeforces Round 751 (Div. 1) {1601} PROGRAMMING 2000.0 95865 2300
1912 Difficult Mountain data structures dp greedy sortings Statement D Codeforces Round 751 (Div. 1) {1601} PROGRAMMING 2250.0 95865 2700
1922 Trader Problem binary search data structures dsu greedy math sortings Statement G Codeforces Round 760 (Div. 3) {1618} PROGRAMMING Codeforces Round #760 (Div. 3) Editorial
10188 MEX and Increments constructive algorithms data structures dp greedy math sortings Statement E Codeforces Round 762 (Div. 3) {1619} PROGRAMMING Tutorial
1914 New School binary search data structures greedy implementation sortings Statement E Hello 2022 {1621} PROGRAMMING 2250.0
3319 Paint the Middle data structures dp greedy sortings Statement C Codeforces Round 768 (Div. 1) {1630} PROGRAMMING 1250.0 Editorial of Codeforces Round #768
4457 Rescheduling the Exam binary search data structures greedy implementation math sortings Statement E Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
14493 Alice and the Cake constructive algorithms data structures greedy sortings Statement C Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) {1654} PROGRAMMING 1250.0 Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) 1400
19985 Longest Strike data structures greedy implementation sortings two pointers Statement F Codeforces Round 790 (Div. 4) {1676} PROGRAMMING Codeforces Round #790 (Div. 4) Editorial
392 MCMF? data structures flows graphs greedy sortings two pointers Statement F Codeforces Round 793 (Div. 2) {1682} PROGRAMMING 2750.0 Codeforces Round #793 (Div. 2) Editorial
2091 Number of Groups data structures dfs and similar dsu graphs greedy sortings Statement E CodeCraft-22 and Codeforces Round 795 (Div. 2) {1691} PROGRAMMING 2250.0 Editorial for CodeCraft-22 and Codeforces Round #795 (Div. 2)
6260 Permutation Restoration binary search data structures greedy math sortings Statement D Educational Codeforces Round 131 (Rated for Div. 2) {1701} PROGRAMMING Educational Codeforces Round 131 Editorial
29784 Yet Another Problem About Pairs Satisfying an Inequality binary search data structures dp greedy sortings Statement F Codeforces Round 806 (Div. 4) {1703} PROGRAMMING 104786
17912 Minimum Notation data structures greedy math sortings Statement C Codeforces Round 823 (Div. 2) {1730} PROGRAMMING 1500.0 Codeforces Round #823 — editorial 1200
24768 Planets data structures data structures greedy sortings Statement A Codeforces Round 823 (Div. 2) {1730} PROGRAMMING 500.0 Codeforces Round #823 — editorial 800
2025 Anya's Simultaneous Exhibition constructive algorithms data structures graphs greedy interactive sortings Statement E Hello 2023 {1779} PROGRAMMING 2250.0
31265 Matryoshkas data structures greedy sortings Statement D Codeforces Round 847 (Div. 3) {1790} PROGRAMMING 111948
1333 Velepin and Marketing data structures dp greedy sortings Statement E Codeforces Round 852 (Div. 2) {1793} PROGRAMMING 2500.0 Codeforces Round #852 Editorial
4086 Music Festival binary search data structures dp greedy sortings Statement C Codeforces Round 857 (Div. 1) {1801} PROGRAMMING 1250.0 Codeforces Round #857 Editorial
7522 Buying gifts data structures dp greedy sortings Statement B Codeforces Round 857 (Div. 1) {1801} PROGRAMMING 1000.0 Codeforces Round #857 Editorial
5535 Survey in Class constructive algorithms data structures greedy implementation sortings Statement D Codeforces Round 879 (Div. 2) {1834} PROGRAMMING 1750.0 Codeforces Round #879 Editorial
16530 Lamps data structures greedy sortings two pointers Statement B Codeforces Round 876 (Div. 2) {1839} PROGRAMMING 1000.0 Codeforces Round #876 (Div. 2) Editorial
5271 Pairs of Segments data structures dp greedy sortings Statement D Educational Codeforces Round 150 (Rated for Div. 2) {1841} PROGRAMMING 117262
475 Min Cost Permutation (Hard Version) binary search data structures graphs greedy sortings Statement F2 Codeforces Round 884 (Div. 1 + Div. 2) {1844} PROGRAMMING 1000.0 Codeforces Round #884 (Div. 1 + Div. 2) Editorial
1026 The Boss's Identity binary search bitmasks data structures dfs and similar greedy math sortings Statement F Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 3000.0 Tutorial
4254 Professor Higashikata brute force data structures dsu greedy implementation sortings Statement D Codeforces Round 882 (Div. 2) {1847} PROGRAMMING 2000.0 Tutorial
24201 Vika and the Bridge binary search data structures greedy implementation math sortings Statement B Codeforces Round 885 (Div. 2) {1848} PROGRAMMING 1000.0 Codeforces Round #885 (Div.2) Editorial
7373 Lisa and the Martians bitmasks data structures greedy math sortings strings trees Statement F Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
7977 Andrey and Escape from Capygrad binary search data structures dp dsu greedy sortings two pointers Statement D Codeforces Round 892 (Div. 2) {1859} PROGRAMMING 1750.0 Video solutions from Geothermal.
3901 Doremy's Drying Plan (Easy Version) brute force data structures dp greedy sortings Statement C1 Codeforces Round 906 (Div. 1) {1889} PROGRAMMING 750.0 Codeforces Round 906 Editorial
5666 Set To Max (Hard Version) binary search constructive algorithms data structures dsu greedy implementation sortings two pointers Statement D2 Codeforces Round 914 (Div. 2) {1904} PROGRAMMING 750.0 Codeforces Round 914 (Div. 2) Editorial
13137 Heavy Intervals constructive algorithms data structures dsu greedy math sortings Statement C Pinely Round 3 (Div. 1 + Div. 2) {1909} PROGRAMMING 1500.0 Editorial of Pinely Round 3 (Div. 1 + Div. 2)
26939 Minimize Inversions constructive algorithms data structures greedy implementation sortings Statement B Codeforces Round 922 (Div. 2) {1918} PROGRAMMING 1000.0 Codeforces Round #922 (Div. 2) Editorial
4555 01 Tree data structures divide and conquer greedy implementation sortings trees Statement D Hello 2024 {1919} PROGRAMMING 1500.0 2100
8134 Lexicographically Largest constructive algorithms data structures greedy sortings Statement C think-cell Round 1 {1930} PROGRAMMING 1500.0 think-cell Round 1 Editorial
5687 Shop Game data structures greedy math sortings Statement D Educational Codeforces Round 165 (Rated for Div. 2) {1969} PROGRAMMING Educational Codeforces Round 165 Editorial 1900
5860 Money Buys Less Happiness Now data structures greedy sortings Statement G Codeforces Round 946 (Div. 3) {1974} PROGRAMMING Codeforces Round #946 (Div. 3) Editorial 2000
827 Remove Bridges data structures dfs and similar dp greedy sortings trees Statement F Educational Codeforces Round 166 (Rated for Div. 2) {1976} PROGRAMMING Educational Codeforces Round 166 Editorial
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
25942 Update Queries data structures greedy sortings Statement C Codeforces Round 954 (Div. 3) {1986} PROGRAMMING 130762
10131 Bouquet (Hard Version) binary search data structures greedy math sortings two pointers Statement B2 Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 500.0 Video Tutorial
15919 Robert Hood and Mrs Hood data structures greedy sortings Statement D Codeforces Round 974 (Div. 3) {2014} PROGRAMMING Discussion stream (With Hints)
237 Complex Segments (Easy Version) binary search data structures divide and conquer dsu greedy math sortings Statement E1 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 2250.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
203 Complex Segments (Hard Version) binary search data structures divide and conquer dsu greedy math sortings Statement E2 Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
9526 Tree Pruning brute force data structures dfs and similar greedy sortings trees Statement C Codeforces Round 975 (Div. 1) {2018} PROGRAMMING 750.0 Editorial of Codeforces Round 975 (Div. 1, Div. 2)
21483 Meaning Mean data structures greedy math sortings Statement A Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 500.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
2677 Penchick and Chloe's Trees data structures dfs and similar dp greedy sortings trees Statement E Codeforces Round 987 (Div. 2) {2031} PROGRAMMING 2500.0 Codeforces Round 987 (Div. 2) Editorial
10812 Move Back at a Cost binary search data structures greedy sortings Statement B Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 750.0 Разбор Codeforces Round 990 (Div. 2 + Div. 1)
8265 Kevin and Competition Memories binary search data structures greedy sortings two pointers Statement D Codeforces Global Round 28 {2048} PROGRAMMING 1250.0 Tutorial
11898 Best Price brute force data structures greedy sortings Statement E Codeforces Round 995 (Div. 3) {2051} PROGRAMMING 137623
7662 Refined Product Optimality binary search data structures greedy implementation math schedules sortings Statement D Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 1750.0 Good Bye 2024: 2025 is NEAR Editorial
14529 Remove Exactly Two brute force data structures dp graphs greedy sortings trees Statement C Codeforces Round 1000 (Div. 2) {2063} PROGRAMMING 1500.0 Codeforces Round 1000 (Div. 2) — Editorial
6740 Quartet Swapping data structures greedy sortings Statement B Codeforces Round 1024 (Div. 1) {2101} PROGRAMMING 1250.0 142788
5391 Changing the String binary search data structures greedy implementation sortings strings Statement E Educational Codeforces Round 179 (Rated for Div. 2) {2111} PROGRAMMING Educational Codeforces Round 179 Editorial
11909 Creating a Schedule constructive algorithms data structures greedy sortings Statement D Educational Codeforces Round 179 (Rated for Div. 2) {2111} PROGRAMMING Educational Codeforces Round 179 Editorial
14806 MEX Count binary search data structures greedy sortings two pointers Statement E Codeforces Round 1034 (Div. 3) {2123} PROGRAMMING Codeforces Round 1034 (Div. 3) Editorial
3538 Adjusting Drones binary search data structures dsu greedy implementation sortings Statement E Codeforces Round 1066 (Div. 1 + Div. 2) {2157} PROGRAMMING 2000.0 Codeforces Round 1066 (Div. 1 + Div. 2) Editorial
10571 Dungeon binary search brute force data structures greedy sortings Statement C Codeforces Global Round 30 (Div. 1 + Div. 2) {2164} PROGRAMMING 1500.0 Codeforces Global Round 30 Editorial
5504 New Year's Gifts data structures greedy implementation sortings two pointers Statement E Educational Codeforces Round 186 (Rated for Div. 2) {2182} PROGRAMMING Educational Codeforces Round 186 Editorial
976 Double Bracket Sequence data structures dp greedy sortings Statement D Codeforces Round 1079 (Div. 1) {2196} PROGRAMMING 2250.0 Tutorial
2754 Mooclear Reactor 2 data structures greedy implementation sortings Statement F Codeforces Round 1084 (Div. 3) {2200} PROGRAMMING Codeforces Round 1084 (Div. 3) Editorial
1745 Tree Orientation (Hard Version) data structures dfs and similar dsu graphs greedy matrices sortings trees Statement D2 Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1250.0 Tutorial