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
22344 Shortest path of the king greedy shortest paths Statement A Codeforces Beta Round 3 {3} PROGRAMMING CF beta 3: разбор и эмоции 1200
6310 Hierarchy dfs and similar dsu greedy shortest paths Statement B Codeforces Beta Round 17 {17} PROGRAMMING Codeforces Beta Round #17 Tutorial 1600
680 Trial for Chief graphs greedy shortest paths Statement E Codeforces Beta Round 37 {37} PROGRAMMING Codeforces Beta Round #37 (Tutorial) 2600
7702 Eternal Victory dfs and similar graphs greedy shortest paths trees Statement D Codeforces Beta Round 57 (Div. 2) {61} PROGRAMMING Round 57-A 1900
478 Track graphs greedy shortest paths Statement C Codeforces Beta Round 72 (Div. 1 Only) {83} PROGRAMMING 2400
2919 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
8784 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
818 Levko and Game graphs greedy shortest paths Statement E Codeforces Round 210 (Div. 1) {360} PROGRAMMING Codeforces Round #210 editorial 2800
10843 Jzzhu and Cities graphs greedy shortest paths Statement B Codeforces Round 257 (Div. 1) {449} PROGRAMMING Codeforces Round #257 Editorial 2000
63506 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
2010 Arthur and Walls constructive algorithms data structures graphs greedy shortest paths Statement D Codeforces Round 297 (Div. 2) {525} PROGRAMMING Codeforces Round #297 (Div.2) Editorial 2300
5650 Paths and Trees graphs greedy shortest paths Statement E Codeforces Round 303 (Div. 2) {545} PROGRAMMING Codeforces Round #303 (Div.2) editorial 2100
4215 Amr and Chemistry brute force graphs greedy math shortest paths Statement C Codeforces Round 312 (Div. 2) {558} PROGRAMMING Codeforces Round #312 (Div. 2) Editorial 2000
6640 Mike and Shortcuts dfs and similar graphs greedy shortest paths Statement B Codeforces Round 361 (Div. 2) {689} PROGRAMMING 45912 1600
1337 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
3100 Cycle In Maze *special dfs and similar graphs greedy shortest paths Statement C VK Cup 2017 - Qualification 1 {769} PROGRAMMING Tutorial 1800
3052 Innokenty and a Football League 2-sat graphs greedy implementation shortest paths strings Statement D Технокубок 2017 - Финал (только для онсайт-финалистов) {780} PROGRAMMING Technocup 2017 Finals and Codeforces Round #403 Editorial 2000
2160 Fishes data structures graphs greedy probabilities shortest paths Statement D Codeforces Round 456 (Div. 2) {912} PROGRAMMING Codeforces Round #456 (Div. 2) Editorial 2100
8453 Fair graphs greedy number theory shortest paths Statement A Codeforces Round 485 (Div. 1) {986} PROGRAMMING Codeforces Round #485 Editorial 1600
1251 Sonya and Ice Cream binary search data structures dp greedy shortest paths trees Statement E Codeforces Round 495 (Div. 2) {1004} PROGRAMMING 60443 2400
873 Timetable constructive algorithms data structures greedy math Statement A Codeforces Round 507 (Div. 1, based on Olympiad of Metropolises) {1039} PROGRAMMING 61668 2400
6022 Edge Deletion graphs greedy shortest paths Statement D Educational Codeforces Round 54 (Rated for Div. 2) {1076} PROGRAMMING E 1800
20135 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
7315 Anna, Svyatoslav and Maps dp graphs greedy shortest paths Statement C Codeforces Round 581 (Div. 2) {1204} PROGRAMMING 69244 1700
9820 Shichikuji and Power Grid dsu graphs greedy shortest paths trees Statement D Codeforces Round 597 (Div. 2) {1245} PROGRAMMING Codeforces Round #597 (Div. 2) Editorial 1900
177 Show Must Go On binary search brute force greedy shortest paths Statement I 2019-2020 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) {1250} PROGRAMMING 3100
11183 Shawarma Tent brute force geometry greedy implementation Statement C Codeforces Round 608 (Div. 2) {1271} PROGRAMMING 72247 1300
9765 Christmas Trees graphs greedy shortest paths Statement D Codeforces Round 611 (Div. 3) {1283} PROGRAMMING Codeforces Round #611 (Div. 3) Editorial 1800
7307 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
3196 Divisor Paths combinatorics graphs greedy math number theory Statement E Educational Codeforces Round 85 (Rated for Div. 2) {1334} PROGRAMMING Educational Codeforces Round 85 Editorial
5778 Weights Distributing brute force graphs greedy shortest paths sortings Statement E Codeforces Round 636 (Div. 3) {1343} PROGRAMMING 76352 2400
21098 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
10444 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
1915 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
14486 Minimal Height Tree graphs greedy shortest paths trees Statement D Educational Codeforces Round 97 (Rated for Div. 2) {1437} PROGRAMMING 84149
2017 Graph Transpositions graphs greedy shortest paths Statement C Codeforces Round 681 (Div. 1, based on VK Cup 2019-2020 - Final) {1442} PROGRAMMING 1500.0 84298
2508 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
3866 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
1926 Cakewalk constructive algorithms greedy implementation shortest paths Statement E April Fools Day Contest 2021 {1505} PROGRAMMING tutorial
3719 Triangular Paths constructive algorithms greedy math shortest paths sortings Statement F Codeforces Round 710 (Div. 3) {1506} PROGRAMMING Editorial
4271 To Go Or Not To Go? dfs and similar graphs greedy shortest paths Statement G Codeforces Round 719 (Div. 3) {1520} PROGRAMMING Editorial
15046 Great Graphs constructive algorithms graphs greedy shortest paths sortings Statement A Codeforces Round 728 (Div. 1) {1540} PROGRAMMING 500.0 Tutorial
389 Four Vertices constructive algorithms data structures graphs greedy implementation shortest paths Statement G Codeforces Global Round 16 {1566} PROGRAMMING 3000.0 Codeforces Global Round 16 Editorial
4872 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
5389 Array Stabilization (AND version) binary search brute force graphs greedy implementation math number theory shortest paths Statement F Codeforces Round 744 (Div. 3) {1579} PROGRAMMING Codeforces Round #744 (Div. 3) Editorial
8432 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
4327 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
697 Armor and Weapons brute force dp greedy shortest paths Statement F Educational Codeforces Round 117 (Rated for Div. 2) {1612} PROGRAMMING 97164
7301 BA-String bitmasks brute force dp greedy implementation math shortest paths Statement C Educational Codeforces Round 119 (Rated for Div. 2) {1620} PROGRAMMING 98061
19194 Make Them Equal dp greedy shortest paths Statement D Educational Codeforces Round 122 (Rated for Div. 2) {1633} PROGRAMMING 99539
462 Snowy Mountain data structures graphs greedy shortest paths trees Statement G Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) {1654} PROGRAMMING 3500.0 Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) 2900
20906 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
957 Labyrinth Adventures data structures dp greedy matrices shortest paths Statement E Educational Codeforces Round 129 (Rated for Div. 2) {1681} PROGRAMMING 103163 2600
3220 Keshi in Search of AmShZ graphs greedy shortest paths Statement C Codeforces Round 800 (Div. 1) {1693} PROGRAMMING 1500.0 Codeforces Round #800 Editorial 2300
14310 Zero Path brute force data structures dp greedy shortest paths Statement C Codeforces Round 801 (Div. 2) and EPIC Institute of Technology Round {1695} PROGRAMMING 1250.0 Editorial for Codeforces Round #801 (Div. 2) and EPIC Institute of Technology Round
6043 Permutation Graph binary search constructive algorithms data structures greedy shortest paths trees Statement D Codeforces Global Round 21 {1696} PROGRAMMING 2000.0 Editorial of Codeforces Global Round 21
131 Late For Work data structures greedy schedules shortest paths Statement F Codeforces Round 819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 {1726} PROGRAMMING 2750.0 Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 Editorial
2111 Ela and the Wiring Wizard graphs greedy shortest paths Statement D Dytechlab Cup 2022 {1737} PROGRAMMING 2000.0 Editorial of Dytechlab Cup 2022
1397 Connectivity Addicts constructive algorithms dsu graphs greedy interactive shortest paths sortings trees Statement F Codeforces Global Round 22 {1738} PROGRAMMING 2750.0 Editorial of Codeforces Global Round <strong>22</strong>
19485 Thermostat greedy math shortest paths Statement C Codeforces Round 834 (Div. 3) {1759} PROGRAMMING 109254
4041 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
2896 The way home dp graphs greedy shortest paths sortings Statement D Codeforces Round 857 (Div. 1) {1801} PROGRAMMING 1750.0 Codeforces Round #857 Editorial
2380 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
4781 Tenzing and His Animal Friends brute force constructive algorithms graphs greedy shortest paths Statement D CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) {1842} PROGRAMMING 1500.0 CodeTON Round 5 Editorial
5801 Rudolf and CodeVid-23 bitmasks dp graphs greedy shortest paths Statement G Codeforces Round 883 (Div. 3) {1846} PROGRAMMING
13450 Nastya and Potions dfs and similar dp graphs greedy shortest paths sortings Statement E Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
9990 Bicycles dp graphs greedy implementation shortest paths sortings Statement G Codeforces Round 918 (Div. 4) {1915} PROGRAMMING 123952
7583 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
3167 Call During the Journey binary search brute force graphs greedy shortest paths Statement G Codeforces Round 966 (Div. 3) {2000} PROGRAMMING 132689
13412 Colored Portals binary search data structures graphs greedy shortest paths Statement D Educational Codeforces Round 169 (Rated for Div. 2) {2004} PROGRAMMING Educational Codeforces Round 169 Editorial
1943 Digital Village (Easy Version) brute force data structures dp dsu graphs greedy implementation math shortest paths trees Statement E1 Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) {2021} PROGRAMMING 1750.0 Codeforces Round #977 (Div. 2, based on COMPFEST 16 — Final Round) Editorial
7185 Skipping brute force data structures dp graphs greedy shortest paths Statement B Codeforces Round 980 (Div. 1) {2023} PROGRAMMING 1000.0 135341
3791 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
109 Affectionate Arrays (Hard Version) data structures dp graphs greedy math shortest paths two pointers Statement I2 Good Bye 2024: 2025 is NEAR {2053} PROGRAMMING 2000.0 Good Bye 2024: 2025 is NEAR Editorial
6651 Graph and Graph data structures graphs greedy shortest paths Statement D Codeforces Round 1002 (Div. 2) {2059} PROGRAMMING 2000.0 139094
1541 Gleb and Boating brute force constructive algorithms data structures dp graphs greedy math shortest paths Statement G Codeforces Round 1013 (Div. 3) {2091} PROGRAMMING Codeforces Round 1013 (Div. 3) Editorial
952 Ain and Apple Tree constructive algorithms greedy math trees Statement E Codeforces Round 1023 (Div. 2) {2107} PROGRAMMING 2750.0 Codeforces Round 1023 (Div 2) Editorial
5752 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
649 Variables and Operations graphs greedy shortest paths Statement F Educational Codeforces Round 180 (Rated for Div. 2) {2112} PROGRAMMING Educational Codeforces Round 180 — Editorial
15505 Gellyfish and Flaming Peony brute force constructive algorithms dp greedy math number theory shortest paths Statement A Codeforces Round 1028 (Div. 1) {2115} PROGRAMMING 500.0 Codeforces Round 1028 (Div.1, Div.2) Editorial
5237 Omg Graph brute force dsu graphs greedy shortest paths sortings Statement G Codeforces Round 1029 (Div. 3) {2117} PROGRAMMING Codeforces Round 1029 (Div. 3) Editorial