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
2848 Domino Principle binary search data structures sortings Statement E Codeforces Beta Round 52 (Div. 2) {56} PROGRAMMING CodeForces Beta Round #52 :: Разбор задач 2100
632 Lucky Tickets binary search data structures sortings two pointers Statement C Codeforces Beta Round 64 {70} PROGRAMMING Analysis Codeforces Beta Round #64 2200
963 Mushroom Gnomes - 2 binary search data structures probabilities sortings Statement C Codeforces Beta Round 99 (Div. 1) {138} PROGRAMMING Codeforces Beta Round #99: editorial 2500
686 Buses and People binary search data structures sortings Statement E Codeforces Round 111 (Div. 2) {160} PROGRAMMING Codeforces Round #111 (Div. 2) Разбор Задач 2400
558 Gripping Story binary search data structures sortings Statement E Codeforces Round 125 (Div. 1) {198} PROGRAMMING Solutions for Codeforces Round #125 2400
4593 Blood Cousins Return binary search data structures dfs and similar dp sortings Statement E Codeforces Round 151 (Div. 2) {246} PROGRAMMING Codeforces Round #151 (Div. 2) Tutorial 2300
585 Printer binary search data structures implementation sortings Statement E Codeforces Round 154 (Div. 2) {253} PROGRAMMING Codeforces Round #154 (Div. 2) — tutorial 2300
578 Sereja and Straight Lines binary search data structures geometry sortings two pointers Statement D Codeforces Round 187 (Div. 1) {314} PROGRAMMING Codeforces Round #187 tutorial 2400
296 Looking for Owls binary search data structures geometry hashing sortings Statement D Codeforces Round 203 (Div. 2) {350} PROGRAMMING Editorial Codeforces Round #203 (Div. 2) 2600
2453 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
696 Bug in Code binary search data structures sortings Statement D Coder-Strike 2014 - Finals (online edition, Div. 2) {421} PROGRAMMING Editorial Coder-Strike 2014 Finals 2100
4236 Pillars binary search data structures dp sortings trees Statement E Codeforces Round 271 (Div. 2) {474} PROGRAMMING Codeforces Round #271 (Div. 2) Editorial 2200
7527 Vasya and Basketball binary search brute force data structures implementation sortings two pointers Statement C Codeforces Round 281 (Div. 2) {493} PROGRAMMING Codeforces Round #281 (Div. 2) Editorial 1700
2529 Infinite Inversions binary search data structures implementation sortings trees Statement E Codeforces Round 301 (Div. 2) {540} PROGRAMMING Tutorial 2400
5257 One-Dimensional Battle Ships binary search data structures greedy sortings Statement D Codeforces Round #Pi (Div. 2) {567} PROGRAMMING Editorial Codeforces Round #Pi 1800
39750 Queries about less or equal elements binary search data structures sortings two pointers Statement B Educational Codeforces Round 2 {600} PROGRAMMING Editorial 1300
23862 Chat Order *special binary search constructive algorithms data structures sortings Statement B VK Cup 2016 - Qualification Round 1 {637} PROGRAMMING 1500
1001 Hostname Aliases *special binary search data structures implementation sortings strings Statement C CROC 2016 - Qualification {644} PROGRAMMING 2300
157 Автобус binary search data structures greedy sortings Statement E Технокубок 2016 - Отборочный Раунд 2 {649} PROGRAMMING 2500.0 2100
2697 Fedor and coupons binary search data structures greedy sortings Statement D Codeforces Round 390 (Div. 2) {754} PROGRAMMING 2000
12910 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
2415 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
2205 Mahmoud and Ehab and the function binary search data structures sortings Statement E Codeforces Round 435 (Div. 2) {862} PROGRAMMING Codeforces round #435 editorial 2200
5146 Too Easy Problems binary search brute force data structures greedy sortings Statement D Hello 2018 {913} PROGRAMMING Tutorial 1800
1089 New Year and the Acquaintance Estimation binary search data structures graphs greedy implementation math sortings Statement E Good Bye 2018 {1091} PROGRAMMING Editorial 2400
1005 Morse Code binary search data structures dp hashing sortings string suffix structures strings Statement C Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 1) {1129} PROGRAMMING 65520 2300
2828 Irrigation binary search data structures implementation sortings trees two pointers Statement D Codeforces Round 567 (Div. 2) {1181} PROGRAMMING Editorial of Codeforces Round #567 (based on All-Russian olympiad in the name of Keldysh) 2100
1860 Culture Code binary search combinatorics data structures dp shortest paths sortings Statement E Educational Codeforces Round 69 (Rated for Div. 2) {1197} PROGRAMMING E 2300
10018 Welfare State binary search brute force data structures sortings Statement B Codeforces Round 576 (Div. 1) {1198} PROGRAMMING E 1600
1242 Choose a Square binary search data structures sortings Statement F Educational Codeforces Round 73 (Rated for Div. 2) {1221} PROGRAMMING Разбор Educational Codeforces Round 73 2500
8185 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
11485 New Year and Ascent Sequence binary search combinatorics data structures dp implementation sortings Statement B Hello 2020 {1284} PROGRAMMING Hello 2020 Editorial 1500
3400 New Year and Conference binary search data structures hashing sortings Statement D Hello 2020 {1284} PROGRAMMING Hello 2020 Editorial 2100
7274 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
4661 Present binary search bitmasks constructive algorithms data structures math sortings Statement B Codeforces Round 626 (Div. 1, based on Moscow Open Olympiad in Informatics) {1322} PROGRAMMING 1000.0 Codeforces Round #626 Editorial
34371 Pair of Topics binary search data structures sortings two pointers Statement D Codeforces Round 627 (Div. 3) {1324} PROGRAMMING Codeforces Round #627 (Div. 3) Editorial
6371 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
1087 Reading Books (hard version) binary search data structures greedy sortings ternary search two pointers Statement E2 Codeforces Round 653 (Div. 3) {1374} PROGRAMMING 79517
6117 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
11062 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
2601 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
313 The Potion of Great Power *special binary search data structures graphs interactive sortings two pointers Statement A Central-European Olympiad in Informatics, CEOI 2020, Day 2 (IOI, Unofficial Mirror Contest, Unrated) {1403} PROGRAMMING CEOI 2020 Online Mirror — Day 2 Tutorial
4689 Searchlights binary search brute force data structures dp geometry implementation sortings Statement D Grakn Forces 2020 {1408} PROGRAMMING 2000.0 Grakn Forces -- Editorial
2713 Complicated Computations binary search data structures sortings two pointers Statement E Codeforces Round 678 (Div. 2) {1436} PROGRAMMING 2500.0 Codeforces Round #678 (Div. 2). Editorial
10313 Divide and Summarize binary search brute force data structures divide and conquer implementation sortings Statement D Codeforces Round 689 (Div. 2, based on Zed Code Competition) {1461} PROGRAMMING 1500.0 Codeforces Round #689 (Div. 2). Editorial
8602 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
8984 Correct Placement binary search data structures sortings two pointers Statement E Codeforces Round 693 (Div. 3) {1472} PROGRAMMING Codeforces Round #693 (Div. 3) Editorial
18487 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
3861 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
4829 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
431 Phoenix and Diamonds binary search data structures sortings Statement I Codeforces Global Round 14 {1515} PROGRAMMING 5000.0 Editorial
12777 PriceFixed binary search data structures greedy sortings two pointers Statement D Codeforces Round 727 (Div. 2) {1539} PROGRAMMING 1500.0 tutorial 1600
3348 Telepanting binary search data structures dp sortings Statement F Codeforces Global Round 15 {1552} PROGRAMMING 1500.0 Editorial of Global Round 15
4556 Boring Segments binary search data structures sortings two pointers Statement E Educational Codeforces Round 112 (Rated for Div. 2) {1555} PROGRAMMING 93389 2100
492 The Cells on the Paper binary search data structures implementation sortings Statement E Codeforces Round 758 (Div.1 + Div. 2) {1608} PROGRAMMING 2000.0 Editorial of Codeforces Round #758 (Div.1 + Div. 2)
1944 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
1926 New School binary search data structures greedy implementation sortings Statement E Hello 2022 {1621} PROGRAMMING 2250.0
98 Spaceship Crisis Management binary search data structures geometry sortings Statement F Codeforces Round 767 (Div. 1) {1628} PROGRAMMING 3000.0 99276
1759 Spanning Tree Queries binary search data structures dsu graphs implementation math sortings Statement E Educational Codeforces Round 122 (Rated for Div. 2) {1633} PROGRAMMING 99539
2851 Anonymity Is Important binary search data structures dsu sortings Statement C Codeforces Round 773 (Div. 1) {1641} PROGRAMMING 1250.0 Codeforces Round #773 editorial
4474 Rescheduling the Exam binary search data structures greedy implementation math sortings Statement E Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
4150 Count the Trains binary search data structures sortings Statement G Codeforces Round 797 (Div. 3) {1690} PROGRAMMING Codeforces Round #797 (Div. 3) Editorial 2000
7547 Max GEQ Sum binary search constructive algorithms data structures divide and conquer implementation sortings two pointers Statement D CodeCraft-22 and Codeforces Round 795 (Div. 2) {1691} PROGRAMMING 1750.0 Editorial for CodeCraft-22 and Codeforces Round #795 (Div. 2)
6288 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
30526 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
2920 Multi-Colored Segments binary search data structures math sortings Statement F Codeforces Round 826 (Div. 3) {1741} PROGRAMMING 107908
16459 Incinerate binary search brute force data structures sortings Statement B Codeforces Round 840 (Div. 2) and Enigma 2022 - Cybros LNMIIT {1763} PROGRAMMING 1000.0 Codeforces Round #840 (Div. 2) and Enigma 2022 — Cybros LNMIIT Editorial
8149 Fixed Prefix Permutations binary search data structures math sortings strings Statement D Educational Codeforces Round 142 (Rated for Div. 2) {1792} PROGRAMMING 111835
4116 Music Festival binary search data structures dp greedy sortings Statement C Codeforces Round 857 (Div. 1) {1801} PROGRAMMING 1250.0 Codeforces Round #857 Editorial
485 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
1033 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
24966 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
8028 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.
156 Freak Joker Process binary search data structures sortings Statement F COMPFEST 15 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1866} PROGRAMMING COMPFEST 15 Preliminary — Editorial
13160 Colorful Table binary search data structures dp implementation math sortings two pointers Statement C CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) {1870} PROGRAMMING 1500.0 CodeTON Round 6 (Div. 1 + Div. 2, Rated, Prizes!) Editorial
5364 Robot Queries binary search data structures geometry sortings Statement D Educational Codeforces Round 159 (Rated for Div. 2) {1902} PROGRAMMING Educational Codeforces Round 159 Editorial
24079 Array Game binary search brute force data structures sortings Statement C Codeforces Round 914 (Div. 2) {1904} PROGRAMMING 1000.0 Codeforces Round 914 (Div. 2) Editorial
5757 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
9825 Messenger in MAC binary search brute force constructive algorithms data structures dp sortings Statement C Codeforces Round 932 (Div. 2) {1935} PROGRAMMING 1500.0 Codeforces Round #932 (Div. 2) Editorial
4418 Cutting Game binary search brute force data structures implementation sortings two pointers Statement F Codeforces Round 946 (Div. 3) {1974} PROGRAMMING Codeforces Round #946 (Div. 3) Editorial 1900
10193 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
241 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)
206 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)
2981 Ardent Flames binary search data structures sortings two pointers Statement F Codeforces Round 988 (Div. 3) {2037} PROGRAMMING Video Tutorial
5326 Recommendations binary search data structures implementation sortings Statement D Educational Codeforces Round 172 (Rated for Div. 2) {2042} PROGRAMMING 136886
10990 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)
2367 Adventurers binary search data structures sortings Statement C Codeforces Round 990 (Div. 1) {2046} PROGRAMMING 1500.0 Разбор Codeforces Round 990 (Div. 2 + Div. 1)
8363 Kevin and Competition Memories binary search data structures greedy sortings two pointers Statement D Codeforces Global Round 28 {2048} PROGRAMMING 1250.0 Tutorial
7725 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
5434 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
2275 Ice Baby binary search brute force data structures dp implementation sortings Statement H Codeforces Round 1032 (Div. 3) {2121} PROGRAMMING Codeforces Round 1032 (Div. 3) Editorial
15056 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
4101 Prefix Maximum Invariance binary search data structures sortings Statement F Codeforces Round 1047 (Div. 3) {2137} PROGRAMMING Codeforces Round 1047 (Div. 3) Editorial
3135 Predicting Popularity binary search data structures math sortings Statement E Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial
3782 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
11126 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
1398 Doorway binary search data structures sortings Statement D 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {2181} PROGRAMMING Tutorial
2981 Zhily and Barknights binary search data structures dp math sortings two pointers Statement B Codeforces Round 1097 (Div. 1, Based on Zhili Cup 2026) {2223} PROGRAMMING 750.0 Codeforces Round 1097 (Div. 1, Div2, Based on Zhili Cup 2026) Tutorial
1135 Minimum Influence binary search data structures geometry greedy implementation math sortings two pointers Statement E Educational Codeforces Round 190 (Rated for Div. 2) {2230} PROGRAMMING Educational Codeforces Round 190 — Editorial