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
5265 Two Paths dfs and similar dp graphs shortest paths trees two pointers Statement D Codeforces Beta Round 14 (Div. 2) {14} PROGRAMMING Codeforces Beta Round #14 tutorial 2100
5981 Hierarchy dfs and similar dsu greedy shortest paths Statement B Codeforces Beta Round 17 {17} PROGRAMMING Codeforces Beta Round #17 Tutorial 1600
8550 Fire Again brute force dfs and similar shortest paths Statement C Codeforces Beta Round 35 (Div. 2) {35} PROGRAMMING 1600
7613 Eternal Victory dfs and similar graphs greedy shortest paths trees Statement D Codeforces Beta Round 57 (Div. 2) {61} PROGRAMMING Round 57-A 1900
105 Harry Potter and Moving Staircases dfs and similar implementation Statement E Codeforces Beta Round 60 {65} PROGRAMMING Codeforces Beta Round #60: tutorial 2900
4934 Missile Silos data structures dfs and similar graphs shortest paths Statement D Codeforces Round 103 (Div. 2) {144} PROGRAMMING Codeforces Round #103 (Div. 2) Разбор Задач. 1900
3976 Chamber of Secrets dfs and similar shortest paths Statement B Croc Champ 2012 - Round 1 {173} PROGRAMMING Croc Champ 2012 — Round 1 — Editorial 1800
10849 King's Path dfs and similar graphs hashing shortest paths Statement C Codeforces Round 149 (Div. 2) {242} PROGRAMMING Codeforces Round #149 (Div. 2) Tutorial 1800
2901 Text Editor data structures dfs and similar graphs greedy shortest paths Statement C Codeforces Round 154 (Div. 2) {253} PROGRAMMING Codeforces Round #154 (Div. 2) — tutorial 1600
645 Rats brute force dfs and similar graphs implementation shortest paths Statement D Codeforces Round 155 (Div. 2) {254} PROGRAMMING Codeforces Round #155 (Div. 2) — tutorial 2600
837 Polo the Penguin and Trees combinatorics dfs and similar trees Statement D Codeforces Round 177 (Div. 1) {288} PROGRAMMING Codeforces Round #177, editorial 2300
446 Monsters and Diamonds dfs and similar graphs shortest paths Statement C MemSQL start[c]up Round 1 {325} PROGRAMMING 2500
7469 Biridian Forest dfs and similar shortest paths Statement B Codeforces Round 192 (Div. 1) {329} PROGRAMMING Codeforces Round #192 Editorial 1700
8750 Xenia and Weights constructive algorithms dfs and similar dp graphs greedy shortest paths Statement C Codeforces Round 197 (Div. 2) {339} PROGRAMMING Codeforces Round #197 — Tutorial 1700
857 Wrong Floyd brute force constructive algorithms dfs and similar graphs Statement E Codeforces Round 203 (Div. 2) {350} PROGRAMMING Editorial Codeforces Round #203 (Div. 2) 2200
1720 Dima and Trap Graph binary search data structures dfs and similar dsu shortest paths two pointers Statement D Codeforces Round 214 (Div. 2) {366} PROGRAMMING Codeforces Round #214 (Div. 2) — Tutorial 2400
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
6487 Design Tutorial: Inverse the Problem dfs and similar dsu shortest paths trees Statement D Codeforces Round 270 {472} PROGRAMMING Editorial 1900
3237 Breaking Good dfs and similar dp graphs shortest paths Statement E Codeforces Round 287 (Div. 2) {507} PROGRAMMING 2200
61809 Two Buttons dfs and similar graphs greedy implementation math shortest paths Statement B Codeforces Round 295 (Div. 2) {520} PROGRAMMING Codeforces Round #295 Editorial (now with bonuses!) 1400
2219 President and Roads dfs and similar graphs hashing shortest paths Statement E Codeforces Round #Pi (Div. 2) {567} PROGRAMMING Editorial Codeforces Round #Pi 2600
995 Run for beer dfs and similar shortest paths Statement G Bubble Cup 8 - Finals [Online Mirror] {575} PROGRAMMING Bubble Cup finals 2015 Results and Editorial 2400
3807 Phillip and Trains dfs and similar graphs shortest paths Statement B Codeforces Round 325 (Div. 1) {585} PROGRAMMING Разбор Codeforces Round #325 1800
3504 Three States dfs and similar graphs shortest paths Statement C Codeforces Round 327 (Div. 1) {590} PROGRAMMING Codeforces Round #327 problems analysis 2200
13020 Igor In the Museum dfs and similar graphs shortest paths Statement D Educational Codeforces Round 1 {598} PROGRAMMING Editorial 1700
6577 Mike and Shortcuts dfs and similar graphs greedy shortest paths Statement B Codeforces Round 361 (Div. 2) {689} PROGRAMMING 45912 1600
1336 Tree Folding dfs and similar dp greedy implementation trees Statement E Codeforces Round 397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined) {765} PROGRAMMING Codeforces Round #397 Editorial 2200
3001 Cycle In Maze *special dfs and similar graphs greedy shortest paths Statement C VK Cup 2017 - Qualification 1 {769} PROGRAMMING Tutorial 1800
2566 The Great Mixing dfs and similar graphs shortest paths Statement C Codeforces Round 407 (Div. 1) {788} PROGRAMMING Codeforces Round #407(Div.1 + Div.2) Editorial 2500
4821 Igor and his way to work dfs and similar graphs implementation shortest paths Statement B Tinkoff Challenge - Elimination Round {793} PROGRAMMING 51685 1600
7146 Police Stations constructive algorithms dfs and similar dp graphs shortest paths trees Statement D Codeforces Round 408 (Div. 2) {796} PROGRAMMING Tutorial 2100
1638 Okabe and City dfs and similar graphs shortest paths Statement D Codeforces Round 420 (Div. 2) {821} PROGRAMMING Tutorial 2200
5061 Olya and Energy Drinks data structures dfs and similar graphs shortest paths Statement D Codeforces Round 442 (Div. 2) {877} PROGRAMMING 55362 1900
252 Iqea data structures dfs and similar divide and conquer dsu shortest paths trees Statement E Codeforces Round 467 (Div. 1) {936} PROGRAMMING Codeforces Round #467, Editorial 3300
7849 Fight Against Traffic dfs and similar graphs shortest paths Statement D Educational Codeforces Round 40 (Rated for Div. 2) {954} PROGRAMMING 58519 1600
2098 Berland and the Shortest Paths brute force dfs and similar graphs shortest paths Statement F Codeforces Round 496 (Div. 3) {1005} PROGRAMMING Codeforces Round 496 (Div. 3): Problem Tutorials 2400
18975 Valid BFS? dfs and similar graphs shortest paths trees Statement D Manthan, Codefest 18 (rated, Div. 1 + Div. 2) {1037} PROGRAMMING Tutorial 1700
1444 Three Pieces dfs and similar dp shortest paths Statement D Educational Codeforces Round 52 (Rated for Div. 2) {1065} PROGRAMMING Educational Codeforces Round 52 Editorial 2200
2857 Multihedgehog dfs and similar graphs shortest paths Statement B Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!] {1067} PROGRAMMING Tutorial 2000
4417 Kilani and the Game dfs and similar graphs implementation shortest paths Statement D Codeforces Round 533 (Div. 2) {1105} PROGRAMMING Tutorial 1900
19527 Lunar New Year and a Wander data structures dfs and similar graphs greedy shortest paths Statement D Codeforces Round 536 (Div. 2) {1106} PROGRAMMING Tutorial 1500
13500 Cover it! dfs and similar dsu graphs shortest paths trees Statement E Codeforces Round 565 (Div. 3) {1176} PROGRAMMING 67598 1700
1056 Daleks' Invasion (medium) dfs and similar graphs shortest paths trees Statement E2 Helvetic Coding Contest 2019 online mirror (teams allowed, unrated) {1184} PROGRAMMING helvetic-coding-contest-2019-editorial.pdf 2200
1362 Koala and Notebook data structures dfs and similar graphs shortest paths strings trees Statement F Codeforces Round 584 - Dasha Code Championship - Elimination Round (rated, open for everyone, Div. 1 + Div. 2) {1209} PROGRAMMING 69791 2600
7863 Nearest Opposite Parity dfs and similar graphs shortest paths Statement E Codeforces Round 605 (Div. 3) {1272} PROGRAMMING Codeforces Round #605 (Div. 3) Editorial 2000
1411 Super Jaber dfs and similar graphs implementation shortest paths Statement F Codeforces Round 619 (Div. 2) {1301} PROGRAMMING 2500.0 Codeforces Round #619 (Div. 2) Editorial 2700
5864 1-Trees and Queries data structures dfs and similar shortest paths trees Statement E Codeforces Round 620 (Div. 2) {1304} PROGRAMMING 2000.0 Codeforces Round #620 (Div. 2) Editorial 2000
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
6435 Navigation System dfs and similar shortest paths Statement B Codeforces Round 625 (Div. 1, based on Technocup 2020 Final Round) {1320} PROGRAMMING 1000.0 Codeforces Round #625 Editorial
2331 Ehab's REAL Number Theory Problem brute force dfs and similar graphs number theory shortest paths Statement E Codeforces Round 628 (Div. 2) {1325} PROGRAMMING 2500.0 74235 2700
4803 Orac and Game of Life dfs and similar graphs implementation shortest paths Statement C Codeforces Round 641 (Div. 1) {1349} PROGRAMMING 1250.0 Codeforces Round #641 Editorial 2000
20687 Solve The Maze constructive algorithms dfs and similar dsu graphs greedy implementation shortest paths Statement D Codeforces Round 648 (Div. 2) {1365} PROGRAMMING 1500.0 Editorial — Codeforces Round #648 1700
1779 The Hidden Pair (Easy Version) binary search dfs and similar graphs interactive shortest paths trees Statement F1 Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 2000.0 Editorial — Codeforces Round #651
1662 The Hidden Pair (Hard Version) binary search dfs and similar graphs interactive shortest paths trees Statement F2 Codeforces Round 651 (Div. 2) {1370} PROGRAMMING 1250.0 Editorial — Codeforces Round #651
10402 Uncle Bogdan and Country Happiness dfs and similar dp greedy math trees Statement C Codeforces Round 660 (Div. 2) {1388} PROGRAMMING 1500.0 Codeforces Round #660 Editorial 1800
393 Spring cleaning *special data structures dfs and similar graphs trees Statement B Central-European Olympiad in Informatics, CEOI 2020, Day 2 (IOI, Unofficial Mirror Contest, Unrated) {1403} PROGRAMMING CEOI 2020 Online Mirror — Day 2 Tutorial
1885 Egor in the Republic of Dagestan constructive algorithms dfs and similar dp graphs greedy shortest paths Statement E Codeforces Round 669 (Div. 2) {1407} PROGRAMMING 2500.0 Codeforces Round #669 Editorial
5070 Reducing Delivery Cost dfs and similar graphs shortest paths Statement G Codeforces Round 677 (Div. 3) {1433} PROGRAMMING Codeforces Round #677 (Div. 3) Editorial
1419 Capitalism constructive algorithms dfs and similar graphs shortest paths Statement E Codeforces Global Round 12 {1450} PROGRAMMING 2500.0 Codeforces Global Round 12 Editorial
5611 Moving to the Capital dfs and similar dp graphs shortest paths Statement G Codeforces Round 693 (Div. 3) {1472} PROGRAMMING Codeforces Round #693 (Div. 3) Editorial
1530 BFS Trees combinatorics dfs and similar graphs math shortest paths trees Statement D Codeforces Round 706 (Div. 1) {1495} PROGRAMMING 2000.0 Codeforces Round #706 Editorial
2501 Bananas in a Microwave dfs and similar dp greedy shortest paths Statement D CodeCraft-21 and Codeforces Round 711 (Div. 2) {1498} PROGRAMMING 2500.0 CodeCraft-21 and Codeforces Round #711 (Div. 2) Editorial
4210 To Go Or Not To Go? dfs and similar graphs greedy shortest paths Statement G Codeforces Round 719 (Div. 3) {1520} PROGRAMMING Editorial
2283 MEX Tree combinatorics constructive algorithms data structures dfs and similar math trees Statement D Codeforces Round 721 (Div. 2) {1527} PROGRAMMING 2250.0 Tutorial 2400
16335 Air Conditioners dfs and similar dp implementation shortest paths sortings two pointers Statement E Codeforces Round 731 (Div. 3) {1547} PROGRAMMING Codeforces Round #731 (Div. 3) Editorial
695 Down Below binary search dfs and similar graphs meet-in-the-middle shortest paths Statement E Codeforces Round 740 (Div. 1, based on VK Cup 2021 - Final (Engine)) {1558} PROGRAMMING 3000.0 Codeforces Round #740 Editorial 3000
4843 The Strongest Build data structures dfs and similar graphs greedy hashing implementation shortest paths Statement D Educational Codeforces Round 114 (Rated for Div. 2) {1574} PROGRAMMING 95188
8330 Escape The Maze (easy version) dfs and similar greedy shortest paths trees two pointers Statement E1 Codeforces Round 756 (Div. 3) {1611} PROGRAMMING Tutorial 1700
4309 Escape The Maze (hard version) dfs and similar dp greedy shortest paths trees two pointers Statement E2 Codeforces Round 756 (Div. 3) {1611} PROGRAMMING Tutorial 2000
1008 Christmas Chocolates dfs and similar dp games graphs implementation math number theory shortest paths trees Statement E Codeforces Round 761 (Div. 2) {1617} PROGRAMMING 3000.0 Editorial for Codeforces Round #761 (Div. 2)
1333 Distance Tree (easy version) dfs and similar shortest paths trees Statement E1 Codeforces Round 769 (Div. 2) {1632} PROGRAMMING 1500.0 Editorial of Codeforces Round #769
1191 Distance Tree (hard version) dfs and similar shortest paths trees Statement E2 Codeforces Round 769 (Div. 2) {1632} PROGRAMMING 1500.0 Editorial of Codeforces Round #769
2918 Counting Shortcuts dfs and similar dp graphs shortest paths Statement G Codeforces Round 776 (Div. 3) {1650} PROGRAMMING 100712
6462 Nearest Excluded Points binary search data structures dfs and similar graphs shortest paths Statement D Educational Codeforces Round 124 (Rated for Div. 2) {1651} PROGRAMMING Educational Codeforces Round 124 Editorial
20576 Getting Zero brute force dfs and similar graphs greedy shortest paths Statement B Educational Codeforces Round 126 (Rated for Div. 2) {1661} PROGRAMMING Educational Codeforces Round 126 Editorial
1226 Antennas data structures dfs and similar graphs graphs implementation implementation shortest paths shortest paths Statement F SWERC 2021-2022 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1662} PROGRAMMING 102042
3689 Labyrinth dfs and similar graphs Statement L 2021-2022 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) {1666} PROGRAMMING Tutorial (PDF)
10734 Required Length brute force dfs and similar dp hashing shortest paths Statement D Educational Codeforces Round 129 (Rated for Div. 2) {1681} PROGRAMMING 103163 1700
2062 Cactus Wall dfs and similar graphs shortest paths Statement E Educational Codeforces Round 138 (Rated for Div. 2) {1749} PROGRAMMING 108269
1194 Doremy's Experimental Tree brute force constructive algorithms dfs and similar dsu sortings trees Statement F Codeforces Global Round 24 {1764} PROGRAMMING 2250.0 Codeforces Global Round 24 Editorial
8406 Friendly Spiders dfs and similar graphs math number theory shortest paths Statement D Codeforces Round 843 (Div. 2) {1775} PROGRAMMING 2000.0 Codeforces Round #843 (Div. 2) Editorial
3983 Timofey and Black-White Tree brute force dfs and similar divide and conquer graphs greedy math shortest paths trees Statement F Codeforces Round 847 (Div. 3) {1790} PROGRAMMING 111948
1311 Tokens on Graph constructive algorithms dfs and similar graphs shortest paths Statement G Codeforces Round 847 (Div. 3) {1790} PROGRAMMING 111948
2349 Between constructive algorithms dfs and similar graphs greedy shortest paths Statement C Codeforces Round 865 (Div. 1) {1815} PROGRAMMING 1750.0 Editorial of Codeforces Round #865 2200
13247 Nastya and Potions dfs and similar dp graphs greedy shortest paths sortings Statement E Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
1800 Fast Travel Text Editor dfs and similar graphs shortest paths Statement E Educational Codeforces Round 153 (Rated for Div. 2) {1860} PROGRAMMING Educational Codeforces Round 153 Editorial
9465 Mad City dfs and similar dsu graphs shortest paths Statement H Codeforces Round 898 (Div. 4) {1873} PROGRAMMING 120634
9504 Minimum Maximum Distance dfs and similar dp graphs shortest paths trees Statement F Codeforces Round 903 (Div. 3) {1881} PROGRAMMING 121327
937 Vova Escapes the Matrix dfs and similar shortest paths Statement F Codeforces Round 910 (Div. 2) {1898} PROGRAMMING 2500.0 Editorial for Codeforces Round #910 (Div. 2)
3999 Unusual Entertainment data structures dfs and similar dsu shortest paths sortings trees Statement G Codeforces Round 909 (Div. 3) {1899} PROGRAMMING Разбор Codeforces Round 909 (Div. 3)
14968 Anji's Binary Tree dfs and similar dp shortest paths trees Statement C Codeforces Round 911 (Div. 2) {1900} PROGRAMMING 1250.0 Codeforces Round 911 (Div. 2) Editorial
2940 Turtle Mission: Robot and the Earthquake dfs and similar dp graphs shortest paths Statement F Codeforces Round 929 (Div. 3) {1933} PROGRAMMING Codeforces Round 929 (Div. 3) Editorial
4615 Rudolf and Subway dfs and similar graphs shortest paths Statement G Codeforces Round 933 (Div. 3) {1941} PROGRAMMING 127018
21034 Arrow Path dfs and similar graphs shortest paths Statement C Educational Codeforces Round 163 (Rated for Div. 2) {1948} PROGRAMMING Educational Codeforces Round 163 Editorial
971 Long Way to be Non-decreasing binary search dfs and similar graphs implementation shortest paths two pointers Statement D Codeforces Round 942 (Div. 1) {1967} PROGRAMMING 1750.0 Tutorial 2800
7474 Paint the Tree brute force dfs and similar dp greedy shortest paths trees Statement D Codeforces Round 947 (Div. 1 + Div. 2) {1975} PROGRAMMING 1500.0 editorial_zh.pdf 1700
3724 Alice's Adventures in Cards constructive algorithms data structures dfs and similar dp graphs greedy implementation shortest paths Statement D Codeforces Round 986 (Div. 2) {2028} PROGRAMMING 1750.0 Codeforces Round 986 (Div. 2) Editorial
4681 Drunken Maze dfs and similar graphs shortest paths Statement D 2024 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) {2041} PROGRAMMING Problem Analysis and Hints (PDF)
362 Porto Vs. Benfica data structures dfs and similar dsu graphs shortest paths Statement E European Championship 2025 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) {2068} PROGRAMMING 140239
875 Spruce Dispute constructive algorithms dfs and similar graphs implementation shortest paths trees Statement E Codeforces Round 1022 (Div. 2) {2108} PROGRAMMING 2750.0 Codeforces Round 1022 Editorial
270 Penguin Steps binary search dfs and similar flows graphs shortest paths Statement F Codeforces Round 1025 (Div. 2) {2109} PROGRAMMING 3000.0 Codeforces Round 1025 (Div. 2) Editorial
5560 D/D/D dfs and similar graphs greedy shortest paths Statement D Codeforces Round 1025 (Div. 2) {2109} PROGRAMMING 1750.0 Codeforces Round 1025 (Div. 2) Editorial
2734 Rada and the Chamomile Valley dfs and similar graphs shortest paths Statement F Codeforces Round 1043 (Div. 3) {2132} PROGRAMMING Codeforces Round 1043 (Div. 3) Editorial
974 Long Journey dfs and similar dp graphs matrices number theory shortest paths Statement F Educational Codeforces Round 183 (Rated for Div. 2) {2145} PROGRAMMING Educational Codeforces Round 183 Editorial