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
2931 Ant on the Tree constructive algorithms dfs and similar trees Statement D Codeforces Beta Round 29 (Div. 2, Codeforces format) {29} PROGRAMMING My solution @ Round #29, [without Problem E] 1900
546 Balance constructive algorithms dfs and similar graphs trees Statement C Codeforces Round 188 (Div. 1) {317} PROGRAMMING Analysis 2700
9337 Ciel the Commander constructive algorithms dfs and similar divide and conquer greedy trees Statement C Codeforces Round 190 (Div. 1) {321} PROGRAMMING Codeforces Round #190 — Editorial 2500
8973 Tree Requests binary search bitmasks constructive algorithms dfs and similar graphs trees Statement D Codeforces Round 316 (Div. 2) {570} PROGRAMMING Codeforces Round #316 Editorial 2400
1039 Bear and Drawing constructive algorithms dfs and similar trees Statement C Codeforces Round 318 [RussianCodeCup Thanks-Round] (Div. 1) {573} PROGRAMMING Codeforces Round #318 [RussianCodeCup Thanks-Round] Editorial 2600
1915 Invariance of Tree constructive algorithms dfs and similar greedy trees Statement B Codeforces Round 319 (Div. 1) {576} PROGRAMMING Editorial Codeforces Round #319 2300
1874 Gifts by the List constructive algorithms dfs and similar graphs trees Statement D Codeforces Round 357 (Div. 2) {681} PROGRAMMING 45425 2100
6167 Fix a Tree constructive algorithms dfs and similar dsu graphs trees Statement B Codeforces Round 363 (Div. 1) {698} PROGRAMMING 46148 1700
711 Santa Clauses and a Soccer Championship constructive algorithms dfs and similar graphs trees Statement F Technocup 2017 - Elimination Round 3 {748} PROGRAMMING Codeforces Round 389 (Div.2) Editorial 2500
2367 Dasha and Puzzle constructive algorithms dfs and similar graphs greedy trees Statement E Codeforces Round 394 (Div. 2) {761} PROGRAMMING Codeforces Round #394 (Div. 2) [Editorial] 2000
3453 Mahmoud and a xor trip bitmasks constructive algorithms data structures dfs and similar dp math trees Statement E Codeforces Round 396 (Div. 2) {766} PROGRAMMING Codeforces round #396 editorial 2200
304 Problem of offices constructive algorithms dfs and similar dp trees Statement E Tinkoff Challenge - Elimination Round {793} PROGRAMMING 51685 2800
7146 Police Stations constructive algorithms dfs and similar dp graphs shortest paths trees Statement D Codeforces Round 408 (Div. 2) {796} PROGRAMMING Tutorial 2100
373 Madness constructive algorithms dfs and similar trees Statement F Codeforces Round 422 (Div. 2) {822} PROGRAMMING Codeforces Round #422 (Div. 2) Editorial 2700
407 Upgrading Tree constructive algorithms dfs and similar graphs math trees Statement C AIM Tech Round 4 (Div. 1) {843} PROGRAMMING AIM Tech Round 4 -- Editorial 2900
2261 Tree Destruction constructive algorithms dfs and similar graphs greedy trees Statement F Educational Codeforces Round 35 (Rated for Div. 2) {911} PROGRAMMING T 2500
2994 Destruction of a Tree constructive algorithms dfs and similar dp greedy trees Statement B Tinkoff Internship Warmup Round 2018 and Codeforces Round 475 (Div. 1) {963} PROGRAMMING Editorial Tinkoff Internship Warmup Round 2018 and Codeforces Round #475 (Div. 1 + Div. 2) 2100
6713 Decorate Apple Tree constructive algorithms dfs and similar dp graphs greedy sortings trees Statement D Mail.Ru Cup 2018 Round 3 {1056} PROGRAMMING Mail.Ru Cup 2018 Round 3 Editorial 1600
1978 Minimal Diameter Forest constructive algorithms dfs and similar greedy trees Statement E Codeforces Round 527 (Div. 3) {1092} PROGRAMMING Codeforces Round #527 (Div. 3) Editorial 2500
9534 Sum in the tree constructive algorithms dfs and similar greedy trees Statement A Codeforces Round 530 (Div. 1) {1098} PROGRAMMING 64331 1600
1161 Construct a tree binary search constructive algorithms dfs and similar graphs greedy trees Statement C Codeforces Round 530 (Div. 1) {1098} PROGRAMMING 64331 2300
3797 Spanning Tree with One Fixed Degree constructive algorithms dfs and similar dsu graphs greedy Statement F2 Codeforces Round 544 (Div. 3) {1133} PROGRAMMING Codeforces Round #544 (Div. 3) Editorial 2200
2542 Privatization of Roads in Treeland binary search constructive algorithms dfs and similar graphs greedy trees Statement G Codeforces Round 547 (Div. 3) {1141} PROGRAMMING 66062 2500
1001 Complete Mirror constructive algorithms dfs and similar dp hashing implementation trees Statement D Codeforces Round 566 (Div. 2) {1182} PROGRAMMING 67614 2500
1296 Add on a Tree: Revolution constructive algorithms dfs and similar implementation trees Statement A2 Codeforces Round 572 (Div. 1) {1188} PROGRAMMING Editorial of Codeforces Round #572 2500
458 Tiles Placement constructive algorithms dfs and similar trees Statement H Codeforces Round 583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) {1214} PROGRAMMING Tutorial 2700
2041 Tests for problem D constructive algorithms dfs and similar divide and conquer trees Statement E Educational Codeforces Round 78 (Rated for Div. 2) {1278} PROGRAMMING Educational Codeforces Round 78 Editorial 2200
5454 Numbers on Tree constructive algorithms data structures dfs and similar graphs greedy trees Statement B Codeforces Round 612 (Div. 1) {1286} PROGRAMMING Codeforces Round #612 - Editorial 2000
3086 Berland Beauty constructive algorithms dfs and similar greedy sortings trees Statement F Codeforces Round 617 (Div. 3) {1296} PROGRAMMING Codeforces Round #617 (Div. 3) Editorial 2400
5354 Kuroni and the Celebration constructive algorithms dfs and similar graphs interactive trees Statement D Ozon Tech Challenge 2020 (Div.1 + Div.2, Rated, T-shirts + prizes!) {1305} PROGRAMMING 1750.0 Ozon Tech Challenge 2020 Editorial 1900
2711 Construct the Binary Tree brute force constructive algorithms dfs and similar trees Statement E Codeforces Round 624 (Div. 3) {1311} PROGRAMMING 74224 2400
17032 Ehab and Path-etic MEXs constructive algorithms dfs and similar greedy trees Statement C Codeforces Round 628 (Div. 2) {1325} PROGRAMMING 1250.0 74235 1500
1068 Nastya and Time Machine constructive algorithms dfs and similar graphs trees Statement D Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov! {1340} PROGRAMMING 1750.0 Codeforces Round #637 Editorial
4951 Ehab's Last Corollary constructive algorithms data structures dfs and similar dp graphs implementation trees Statement D Codeforces Round 649 (Div. 2) {1364} PROGRAMMING 2000.0 Codeforces round #649 editorial 2100
1921 Pairs of Pairs constructive algorithms dfs and similar graphs trees Statement E Codeforces Round 663 (Div. 2) {1391} PROGRAMMING 2750.0 Codeforces Round #663 (Div. 2) Editorial
433 Distance Matching binary search constructive algorithms dfs and similar trees Statement E Codeforces Round 666 (Div. 1) {1396} PROGRAMMING 2500.0 Codeforces Round #666 — Editorial
10501 Maximum Distributed Tree constructive algorithms dfs and similar greedy math number theory sortings trees Statement D Codeforces Round 665 (Div. 2) {1401} PROGRAMMING 1750.0 Codeforces Round #665 (Div. 2) Editorial
11721 Link Cut Centroids constructive algorithms dfs and similar graphs trees Statement C Codeforces Round 670 (Div. 2) {1406} PROGRAMMING 1500.0 Codeforces Round #670 (Div. 2) Editorial
30382 Districts Connection constructive algorithms dfs and similar trees Statement D Codeforces Round 677 (Div. 3) {1433} PROGRAMMING Codeforces Round #677 (Div. 3) Editorial
2068 Phoenix and Earthquake constructive algorithms dfs and similar dsu graphs greedy trees Statement F Codeforces Global Round 14 {1515} PROGRAMMING 3250.0 Editorial
893 Off by One constructive algorithms dfs and similar geometry graphs sortings trees Statement E Educational Codeforces Round 108 (Rated for Div. 2) {1519} PROGRAMMING Educational Codeforces Round 108 Editorial
2289 Nastia Plays with a Tree constructive algorithms data structures dfs and similar dp flows graphs greedy implementation trees Statement D Codeforces Round 720 (Div. 2) {1521} PROGRAMMING 2250.0 90477
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
3048 Mocha and Diana (Hard Version) brute force constructive algorithms dfs and similar dsu graphs greedy trees two pointers Statement D2 Codeforces Round 738 (Div. 2) {1559} PROGRAMMING 1500.0 Tutorial (en) 2500
9105 Bakry and Partitioning bitmasks constructive algorithms dfs and similar dp graphs trees Statement C Codeforces Round 746 (Div. 2) {1592} PROGRAMMING 1500.0 95583
3243 Treelabeling bitmasks constructive algorithms dfs and similar games graphs greedy trees Statement D Codeforces Round 754 (Div. 2) {1605} PROGRAMMING 2000.0 tutorial 2100
16207 Not Assigning constructive algorithms dfs and similar number theory trees Statement C Codeforces Round 766 (Div. 2) {1627} PROGRAMMING 1250.0 Codeforces Round #766 (Div. 2) Editorial
2158 Towers constructive algorithms dfs and similar dp greedy trees Statement F Codeforces Global Round 19 {1637} PROGRAMMING 3250.0 Tutorial
4428 Weight the Tree constructive algorithms dfs and similar dp implementation trees Statement D Codeforces Round 774 (Div. 2) {1646} PROGRAMMING 2000.0 Codeforces Round #774 (Div. 2) Editorial 2000
3849 Equal Tree Sums constructive algorithms dfs and similar trees Statement E CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes!) {1656} PROGRAMMING 2500.0 Tutorial
800 Edge Elimination constructive algorithms dfs and similar dp trees Statement D Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2000.0 Codeforces Round #783 Editorial 2900
1936 Hemose on the Tree bitmasks constructive algorithms dfs and similar trees Statement E Codeforces Round 788 (Div. 2) {1670} PROGRAMMING 2750.0 Tutorial 2200
13412 Infected Tree constructive algorithms dfs and similar dp greedy trees Statement C Codeforces Round 798 (Div. 2) {1689} PROGRAMMING 1250.0 Editorial for Codeforces Round #798 (Div. 2)
2449 Tree Queries (Easy Version) constructive algorithms dfs and similar dp greedy trees Statement D1 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
2284 Tree Queries (Hard Version) constructive algorithms dfs and similar dp greedy trees Statement D2 Codeforces Round 801 (Div. 2) and EPIC Institute of Technology Round {1695} PROGRAMMING 1000.0 Editorial for Codeforces Round #801 (Div. 2) and EPIC Institute of Technology Round
1127 Tree Recovery bitmasks brute force constructive algorithms dfs and similar dsu graphs trees Statement F Codeforces Global Round 21 {1696} PROGRAMMING 2500.0 Editorial of Codeforces Global Round 21
4145 Edge Split brute force constructive algorithms dfs and similar graphs probabilities trees Statement D Codeforces Round 819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 {1726} PROGRAMMING 2000.0 Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022 Editorial
3740 Permutation Addicts constructive algorithms dfs and similar dsu graphs trees Statement D Codeforces Global Round 22 {1738} PROGRAMMING 2000.0 Editorial of Codeforces Global Round <strong>22</strong>
5029 Hanging Hearts constructive algorithms data structures dfs and similar dp greedy trees Statement E Codeforces Round 831 (Div. 1 + Div. 2) {1740} PROGRAMMING 2000.0 Tutorial 1800
10240 SlavicG's Favorite Problem bitmasks brute force constructive algorithms data structures dfs and similar graphs greedy Statement G Codeforces Round 835 (Div. 4) {1760} PROGRAMMING 109348
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
1146 XOR, Tree, and Queries constructive algorithms dfs and similar dsu graphs trees Statement F Codeforces Round 851 (Div. 2) {1788} PROGRAMMING 3000.0 Codeforces Round #851 (Div. 2) Editorial
5074 Fish Graph brute force constructive algorithms dfs and similar graphs trees Statement B Codeforces Round 869 (Div. 1) {1817} PROGRAMMING 1000.0 Codeforces Round #869 (Div.1, Div.2) Editorial
556 Bus Routes binary search constructive algorithms dfs and similar greedy trees Statement E Codeforces Round 873 (Div. 1) {1827} PROGRAMMING 2500.0 Codeforces Round #873 (Div. 1 & 2) Editorial 3400
1174 Tree Weights bitmasks constructive algorithms data structures dfs and similar math matrices number theory trees Statement G Codeforces Round 884 (Div. 1 + Div. 2) {1844} PROGRAMMING 3500.0 Codeforces Round #884 (Div. 1 + Div. 2) Editorial
508 Most Different Tree brute force constructive algorithms dfs and similar greedy hashing Statement F Codeforces Round 897 (Div. 2) {1867} PROGRAMMING 4000.0
2712 Autosynthesis 2-sat constructive algorithms dfs and similar dp flows graphs trees Statement C Codeforces Round 902 (Div. 1, based on COMPFEST 15 - Final Round) {1876} PROGRAMMING 1250.0 Codeforces Round #902 (Div. 1, Div. 2, based on COMPFEST 15 — Final Round) Editorial
304 Evidence Board *special constructive algorithms dfs and similar graphs trees Statement B XVIII Open Olympiad in Informatics - Final Stage, Day 1 (Unrated, Online Mirror, IOI rules) {1939} PROGRAMMING
2590 Tree Compass constructive algorithms dfs and similar greedy trees Statement C Codeforces Round 934 (Div. 1) {1943} PROGRAMMING 1250.0 Codeforces Round #934 (Div1, Div2) Editorial
2857 DFS Checker (Hard Version) constructive algorithms data structures dfs and similar hashing implementation trees Statement D2 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) {2002} PROGRAMMING 1250.0 EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial
1892 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
3906 Cool Graph constructive algorithms data structures dfs and similar dsu graphs trees Statement D Refact.ai Match 1 (Codeforces Round 985) {2029} PROGRAMMING 2250.0 Refact.ai Match 1 (Codeforces Round 985) Editorial
5833 Non Prime Tree brute force constructive algorithms dfs and similar greedy number theory trees two pointers Statement D Codeforces Round 992 (Div. 2) {2040} PROGRAMMING 2000.0 Codeforces Round #992 (Div.2) Editorial
9624 Trapmigiano Reggiano constructive algorithms dfs and similar sortings trees Statement C Codeforces Round 1007 (Div. 2) {2071} PROGRAMMING 1500.0 Codeforces Round 1007 (Div. 2) Editorial
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
9365 Reachability and Tree constructive algorithms dfs and similar dp trees Statement D Educational Codeforces Round 180 (Rated for Div. 2) {2112} PROGRAMMING Educational Codeforces Round 180 — Editorial
2721 Ancient Tree constructive algorithms data structures dfs and similar dsu greedy trees Statement E Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) {2127} PROGRAMMING 2500.0 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial
1663 I Yearned For The Mines constructive algorithms dfs and similar trees Statement E Codeforces Round 1044 (Div. 2) {2133} PROGRAMMING 2750.0 Codeforces Round 1044 (Div. 2) Editorial
3624 Sliding Tree constructive algorithms dfs and similar trees Statement D Codeforces Round 1045 (Div. 2) {2134} PROGRAMMING 2000.0 145832
4726 Catshock constructive algorithms dfs and similar graphs trees Statement D Codeforces Round 1060 (Div. 2) {2154} PROGRAMMING 1750.0 Codeforces Round 1060 (Div. 2) Editorial
2480 Tree Coloring (Hard Version) constructive algorithms data structures dfs and similar greedy implementation trees Statement D2 Hello 2026 {2183} PROGRAMMING 2000.0
8734 Tree Coloring (Easy Version) constructive algorithms dfs and similar greedy trees Statement D1 Hello 2026 {2183} PROGRAMMING 1000.0
4041 Tree Orientation (Easy Version) constructive algorithms dfs and similar dsu graphs greedy trees Statement D1 Codeforces Round 1086 (Div. 2) {2208} PROGRAMMING 1250.0 Tutorial