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
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
754 FreeDiv dfs and similar graphs greedy Statement D Codeforces Beta Round 66 {73} PROGRAMMING Codeforces Beta Round #66 editorial: Problems A, B, C 2200
617 T-decomposition dfs and similar graphs greedy trees Statement D Codeforces Round 147 (Div. 2) {237} PROGRAMMING Codeforces Round #147 (Div. 2) Разбор Задач 2200
428 Road Repairs dfs and similar graphs greedy Statement E Codeforces Round 145 (Div. 1, ACM-ICPC Rules) {240} PROGRAMMING 2800
2026 Dispute dfs and similar graphs greedy Statement D Codeforces Round 149 (Div. 2) {242} PROGRAMMING Codeforces Round #149 (Div. 2) Tutorial 2100
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
1151 Lovely Matrix dfs and similar graphs greedy sortings Statement D Codeforces Round 168 (Div. 1) {274} PROGRAMMING Codeforces Round #168 Editorial 2100
153 Greedy Petya *special dfs and similar graphs greedy Statement F April Fools Day Contest 2013 {290} PROGRAMMING April Fools Day Contest 2013: editorial 2800
940 The Red Button combinatorics dfs and similar dsu graphs greedy Statement E MemSQL start[c]up Round 1 {325} PROGRAMMING Editorial 2700
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
910 Pumping Stations brute force dfs and similar divide and conquer flows graphs greedy trees Statement E Codeforces Round 200 (Div. 1) {343} PROGRAMMING Codeforces Round #200 Tutorial 2800
1018 Fools and Foolproof Roads data structures dfs and similar dsu graphs greedy Statement D Codeforces Round 212 (Div. 2) {362} PROGRAMMING Codeforces Round #212 (Div. 2). Tutorial. Part 1. 2500
9584 New Year Permutation dfs and similar dsu graphs greedy math sortings Statement B Good Bye 2014 {500} PROGRAMMING Tutorial 2 1600
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
1580 Looksery Party constructive algorithms dfs and similar graphs greedy Statement B Looksery Cup 2015 {549} PROGRAMMING Looksery Cup 2015 Editorial 2300
718 CNF 2 constructive algorithms dfs and similar graphs greedy Statement C Codeforces Round 317 [AimFund Thanks-Round] (Div. 1) {571} PROGRAMMING Codeforces Round #317 [AimFund Thanks-Round] Editorial 2600
1237 Bribes dfs and similar graphs trees Statement B Bubble Cup 8 - Finals [Online Mirror] {575} PROGRAMMING Bubble Cup finals 2015 Results and Editorial 2300
979 Preorder Test binary search dfs and similar dp graphs greedy trees Statement D 8VC Venture Cup 2016 - Final Round {627} PROGRAMMING 8VC Venture Cup 2016 — Final Round Editorial 2600
2244 Road Improvement *special dfs and similar graphs greedy trees Statement C VK Cup 2016 - Qualification Round 2 {638} PROGRAMMING 2100
2172 Table Compression dfs and similar dp dsu graphs greedy Statement C Codeforces Round 345 (Div. 1) {650} PROGRAMMING Codeforces Round #345: editorial 2300
7983 New Reform data structures dfs and similar dsu graphs greedy Statement E Codeforces Round 346 (Div. 2) {659} PROGRAMMING Editorial for Codeforces Round #346 (Div. 2) 1600
1951 Polycarp and Hay dfs and similar dsu graphs greedy sortings Statement F Codeforces Round 346 (Div. 2) {659} PROGRAMMING Editorial for Codeforces Round #346 (Div. 2) 2100
6577 Mike and Shortcuts dfs and similar graphs greedy shortest paths Statement B Codeforces Round 361 (Div. 2) {689} PROGRAMMING 45912 1600
4334 Centroids data structures dfs and similar dp graphs greedy trees Statement C AIM Tech Round 3 (Div. 1) {708} PROGRAMMING Editorial 2500
7492 Lakes in Berland dfs and similar dsu graphs greedy implementation Statement D Codeforces Round 375 (Div. 2) {723} PROGRAMMING 1600
2248 One-Way Reform constructive algorithms dfs and similar flows graphs greedy Statement E Codeforces Round 375 (Div. 2) {723} PROGRAMMING Codeforces Round #375 (Div.2) Editorial 2300
7782 Socks dfs and similar dsu graphs greedy Statement C Codeforces Round 376 (Div. 2) {731} PROGRAMMING 47840 1600
552 Broken Tree dfs and similar dp graphs greedy trees Statement E Codeforces Round 392 (Div. 2) {758} PROGRAMMING Codeforces Round #392 (Div. 2) Editorial 2900
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
4630 Garland dfs and similar graphs greedy trees Statement C Codeforces Round 398 (Div. 2) {767} PROGRAMMING Codeforces Round #398 (Div. 2) Editorial 2000
3001 Cycle In Maze *special dfs and similar graphs greedy shortest paths Statement C VK Cup 2017 - Qualification 1 {769} PROGRAMMING Tutorial 1800
10001 Andryusha and Colored Balloons dfs and similar graphs greedy trees Statement C Технокубок 2017 - Финал (только для онсайт-финалистов) {780} PROGRAMMING Technocup 2017 Finals and Codeforces Round #403 Editorial 1500
4281 Minimal Labels data structures dfs and similar graphs greedy Statement E Educational Codeforces Round 25 {825} PROGRAMMING Educational Codeforces Round 25 - Editorial 2400
28055 Rumor dfs and similar graphs greedy Statement C Educational Codeforces Round 33 (Rated for Div. 2) {893} PROGRAMMING 55989 1300
2446 Coprocessor dfs and similar dp graphs greedy Statement E Codeforces Round 455 (Div. 2) {909} PROGRAMMING Codeforces Round #455 (Div. 2) Editorial 2100
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
8099 Love Rescue dfs and similar dsu graphs greedy strings Statement D Codeforces Round 464 (Div. 2) {939} PROGRAMMING Analysis of Codeforces Round #464 1600
744 Maximum Control (medium) data structures dfs and similar graphs greedy trees Statement B2 Helvetic Coding Contest 2018 online mirror (teams allowed, unrated) {958} PROGRAMMING helvetic-coding-contest-2018-editorial.pdf 2400
15741 Cut 'em all! dfs and similar dp graphs greedy trees Statement C Codeforces Round 484 (Div. 2) {982} PROGRAMMING Editorial 1500
7804 Reachability from the Capital dfs and similar graphs greedy Statement E Codeforces Round 490 (Div. 3) {999} PROGRAMMING 60138 1900
1466 Leaf Sets data structures dfs and similar dsu graphs greedy sortings trees Statement F Codeforces Round 510 (Div. 2) {1042} PROGRAMMING Tutorial 2400
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
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
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
1767 Power Tree dfs and similar dp dsu graphs greedy trees Statement D Codeforces Round 543 (Div. 1, based on Technocup 2019 Final Round) {1120} PROGRAMMING Разбор задач финала Технокубка 2019 и Codeforces Round #543 2400
3617 Gourmet choice dfs and similar dp dsu graphs greedy Statement D Codeforces Round 541 (Div. 2) {1131} PROGRAMMING Codeforces Round #541 Editorial 2000
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
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
5689 Recover it! dfs and similar graphs greedy number theory sortings Statement D Codeforces Round 565 (Div. 3) {1176} PROGRAMMING 67598 1900
994 Vus the Cossack and a Graph dfs and similar graphs greedy implementation Statement F Codeforces Round 571 (Div. 2) {1186} PROGRAMMING E 2300
3013 Unstable String Sort data structures dfs and similar dsu graphs greedy implementation strings Statement F Codeforces Round 582 (Div. 3) {1213} PROGRAMMING Codeforces Round #582 (Div. 3) Editorial 2400
2999 Tourism dfs and similar dp dsu graphs greedy trees Statement E Codeforces Round 586 (Div. 1 + Div. 2) {1220} PROGRAMMING Codeforces Round #586 Editorial 2200
1750 Wires dfs and similar graphs greedy Statement N 2019-2020 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) {1250} PROGRAMMING 2200
10229 Harmonious Graph constructive algorithms dfs and similar dsu graphs greedy sortings Statement D Codeforces Round 600 (Div. 2) {1253} PROGRAMMING Editorial 1700
3038 Jeremy Bearimy dfs and similar graphs greedy trees Statement C Codeforces Round 607 (Div. 1) {1280} PROGRAMMING Codeforces Round #607 Editorial 2000
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
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
2319 Ehab's Last Theorem constructive algorithms dfs and similar graphs greedy Statement F Codeforces Round 628 (Div. 2) {1325} PROGRAMMING 2750.0 74235 2600
2411 Robots on a Grid data structures dfs and similar dsu graphs greedy matrices Statement F Codeforces Round 634 (Div. 3) {1335} PROGRAMMING 75993 2600
901 Phoenix and Memory data structures dfs and similar graphs greedy Statement F Codeforces Round 638 (Div. 2) {1348} PROGRAMMING 3000.0 Codeforces Round #638 (Div. 2) Editorial 2600
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
6902 Captain Flint and Treasure data structures dfs and similar dp graphs greedy implementation trees Statement D Codeforces Round 660 (Div. 2) {1388} PROGRAMMING 2000.0 Codeforces Round #660 Editorial 2000
492 Directing Edges dfs and similar dp graphs greedy trees Statement G Educational Codeforces Round 92 (Rated for Div. 2) {1389} PROGRAMMING 80809
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
15386 Minimum Ties brute force constructive algorithms dfs and similar graphs greedy implementation math Statement C Educational Codeforces Round 104 (Rated for Div. 2) {1487} PROGRAMMING 87873
1721 Complete the MST data structures dfs and similar dsu graphs greedy math Statement C Codeforces Round 715 (Div. 1) {1508} PROGRAMMING 1500.0 Codeforces Round #715 Editorial
12429 Min Cost String brute force constructive algorithms dfs and similar graphs greedy Statement D Educational Codeforces Round 107 (Rated for Div. 2) {1511} PROGRAMMING 89634
2068 Phoenix and Earthquake constructive algorithms dfs and similar dsu graphs greedy trees Statement F Codeforces Global Round 14 {1515} PROGRAMMING 3250.0 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
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
699 Falling Sand (Hard Version) dfs and similar dp graphs greedy Statement F2 Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) {1534} PROGRAMMING 1250.0 Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) Editorial
1391 Falling Sand (Easy Version) dfs and similar graphs greedy Statement F1 Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) {1534} PROGRAMMING 1750.0 Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) Editorial
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
4440 Buds Re-hanging dfs and similar graphs greedy trees Statement E Codeforces Global Round 16 {1566} PROGRAMMING 2000.0 Codeforces Global Round 16 Editorial
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
2479 Moment of Bloom constructive algorithms dfs and similar graph matchings graphs greedy Statement E Technocup 2022 - Elimination Round 1 {1583} PROGRAMMING 2250.0 Editorial for Technocup 2022 — Elimination Round 1 and Codeforces Round #749 (Div. 1+Div. 2)
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
7350 Game Master data structures dfs and similar dp graphs greedy two pointers Statement C Codeforces Round 758 (Div.1 + Div. 2) {1608} PROGRAMMING 1000.0 Editorial of Codeforces Round #758 (Div.1 + Div. 2)
2720 Cars constructive algorithms dfs and similar dsu graphs greedy sortings Statement E Codeforces Round 772 (Div. 2) {1635} PROGRAMMING 2250.0 Codeforces Round #772 Editorial
1962 AND-MEX Walk bitmasks brute force data structures dfs and similar dsu graphs greedy Statement E Codeforces Round 782 (Div. 2) {1659} PROGRAMMING 2250.0 Codeforces Round #782 (Div. 2) 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
4073 Tokitsukaze and Two Colorful Tapes constructive algorithms dfs and similar dsu graphs greedy Statement C Codeforces Round 789 (Div. 1) {1677} PROGRAMMING 1250.0 Tutorial
745 Unordered Swaps constructive algorithms dfs and similar graphs greedy math sortings Statement E Codeforces Round 793 (Div. 2) {1682} PROGRAMMING 2500.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)
1893 DFS Trees data structures dfs and similar dsu graphs greedy trees Statement C Codeforces Round 808 (Div. 1) {1707} PROGRAMMING 1250.0 104930
10906 Phase Shift dfs and similar dsu graphs greedy strings Statement C Codeforces Round 824 (Div. 2) {1735} PROGRAMMING 1250.0 Codeforces Round #824 — editorial
6216 Reset K Edges binary search data structures dfs and similar graphs greedy trees Statement D Educational Codeforces Round 136 (Rated for Div. 2) {1739} PROGRAMMING Educational Codeforces Round 136 Editorial
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
10709 Set Construction constructive algorithms dfs and similar graphs greedy Statement C Pinely Round 1 (Div. 1 + Div. 2) {1761} PROGRAMMING 1250.0 Pinely Round 1 (Div. 1 + Div. 2) Editorial
8955 Lucky Permutation dfs and similar dsu graphs greedy Statement D Codeforces Round 842 (Div. 2) {1768} PROGRAMMING 1750.0 Codeforces Round #842 (Div. 2) Editorial
1311 Double Sort II dfs and similar flows graphs greedy Statement F Educational Codeforces Round 141 (Rated for Div. 2) {1783} PROGRAMMING Educational Codeforces Round 141 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
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
9938 The Third Letter dfs and similar graphs greedy implementation Statement H Codeforces Round 886 (Div. 4) {1850} PROGRAMMING Codeforces Round #886 (Div. 4) Editorial
13247 Nastya and Potions dfs and similar dp graphs greedy shortest paths sortings Statement E Codeforces Round 888 (Div. 3) {1851} PROGRAMMING 118667
6863 Cyclic Operations constructive algorithms dfs and similar graphs greedy implementation Statement D Codeforces Round 897 (Div. 2) {1867} PROGRAMMING 2000.0
1854 Infinite Card Game brute force dfs and similar games graphs greedy sortings Statement E Educational Codeforces Round 157 (Rated for Div. 2) {1895} PROGRAMMING Educational Codeforces Round 157 Editorial
1972 Compressed Tree dfs and similar dp graphs greedy trees Statement E Educational Codeforces Round 158 (Rated for Div. 2) {1901} PROGRAMMING Educational Codeforces Round 158 Editorial
2323 Lights constructive algorithms dfs and similar graphs greedy implementation Statement G Codeforces Round 913 (Div. 3) {1907} PROGRAMMING Codeforces Round 913 (Div. 3) Editorial
1095 Caterpillar on a Tree binary search dfs and similar graphs greedy implementation trees Statement F Codeforces Round 922 (Div. 2) {1918} PROGRAMMING 3000.0 Codeforces Round #922 (Div. 2) Editorial
4506 Vlad and Trouble at MIT dfs and similar dp flows graphs greedy implementation trees Statement G Codeforces Round 928 (Div. 4) {1926} PROGRAMMING 126132
5360 Microcycle data structures dfs and similar dsu graphs greedy trees Statement F Codeforces Round 923 (Div. 3) {1927} PROGRAMMING 125597
17364 Permutation Game brute force dfs and similar games graphs greedy math Statement D Codeforces Round 943 (Div. 3) {1968} PROGRAMMING 129096 1300
2877 Cases bitmasks brute force combinatorics dfs and similar dp graphs greedy strings Statement D Codeforces Round 961 (Div. 2) {1995} PROGRAMMING 2250.0 Video Tutorial
4627 Turtle and a MEX Problem (Hard Version) dfs and similar dp graphs greedy implementation Statement D2 Codeforces Round 968 (Div. 2) {2003} PROGRAMMING 1250.0 sol-zh.pdf
1369 C+K+S brute force constructive algorithms dfs and similar graphs greedy hashing math strings Statement C Codeforces Round 980 (Div. 1) {2023} PROGRAMMING 1500.0 135341
1047 Choose Your Queries dfs and similar dp graphs greedy trees Statement F Educational Codeforces Round 170 (Rated for Div. 2) {2025} PROGRAMMING Educational Codeforces Round 170 Editorial
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
2656 Control of Randomness combinatorics dfs and similar graphs greedy math probabilities trees Statement E Codeforces Round 992 (Div. 2) {2040} PROGRAMMING 2250.0 Codeforces Round #992 (Div.2) Editorial
12171 Graph Composition dfs and similar dsu graphs greedy Statement E Codeforces Round 998 (Div. 3) {2060} PROGRAMMING Codeforces Round 998 (Div. 3) Editorial
7049 Skibidus and Slay data structures dfs and similar graphs greedy trees Statement F Codeforces Round 1003 (Div. 4) {2065} PROGRAMMING Video Tutorial
16043 Disappearing Permutation dfs and similar dsu graphs greedy implementation Statement C Educational Codeforces Round 177 (Rated for Div. 2) {2086} PROGRAMMING Educational Codeforces Round 177 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
8529 Fewer Batteries binary search dfs and similar dp graphs greedy Statement D Codeforces Round 1026 (Div. 2) {2110} PROGRAMMING 2000.0 Codeforces Round 1026 (Div. 2) Editorial
3945 Gellyfish and Camellia Japonica constructive algorithms dfs and similar dp graphs greedy Statement B Codeforces Round 1028 (Div. 1) {2115} PROGRAMMING 1250.0 Codeforces Round 1028 (Div.1, Div.2) Editorial
14005 Max Tree dfs and similar graphs greedy Statement C Codeforces Round 1051 (Div. 2) {2143} PROGRAMMING 1500.0 Codeforces Round 1051 (Div. 2) Editorial
1566 Journey dfs and similar dsu graphs greedy Statement E Codeforces Global Round 30 (Div. 1 + Div. 2) {2164} PROGRAMMING 2250.0 Codeforces Global Round 30 Editorial
1332 Jerry and Tom data structures dfs and similar games graphs greedy trees Statement C Codeforces Round 1077 (Div. 1) {2187} PROGRAMMING 1750.0 Codeforces Round 1077 (Div. 1, Div. 2) Editorial
2002 Swap to Rearrange constructive algorithms dfs and similar graph matchings graphs greedy strings Statement E Codeforces Round 1081 (Div. 2) {2192} PROGRAMMING 2250.0 Codeforces Round 1081 (Div. 2) Editorial
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
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