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

1 2 >

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
324 Galaxy Union dp trees two pointers Statement G School Personal Contest #3 (Winter Computer School 2010/11) - Codeforces Beta Round 45 (ACM-ICPC Rules) {48} PROGRAMMING 2600
811 Caterpillar dfs and similar dp graphs trees Statement F Codeforces Beta Round 48 {51} PROGRAMMING 2600
587 Information Reform dp implementation trees Statement E Codeforces Beta Round 64 {70} PROGRAMMING Analysis Codeforces Beta Round #64 2700
2047 Big Maximum Sum data structures dp greedy implementation math trees Statement D Codeforces Beta Round 67 (Div. 2) {75} PROGRAMMING Codeforces Beta Round #67 (Div. 2) Editorial 2100
1169 Beavermuncher-0xFF dfs and similar dp dsu greedy trees Statement C Codeforces Beta Round 69 (Div. 1 Only) {77} PROGRAMMING Codeforces Beta Round #69 tutorial 2300
398 Pairs dfs and similar dp dsu graphs implementation trees Statement E Yandex.Algorithm Open 2011: Qualification 1 {81} PROGRAMMING 2600
857 Genetic engineering dp string suffix structures trees Statement C Yandex.Algorithm 2011: Round 2 {86} PROGRAMMING Problemset analysis (Yandex, Round 2) 2400
1051 Beautiful Road dfs and similar dp dsu graphs implementation sortings trees Statement D Codeforces Beta Round 73 (Div. 1 Only) {87} PROGRAMMING CodeForces Beta Round #73 div. 1 analysis (particulary with div. 2) 2300
790 Castle dp greedy probabilities sortings trees Statement D Codeforces Beta Round 79 (Div. 1 Only) {101} PROGRAMMING Codeforces Beta Round 79, editoral 2300
4088 Lucky Tree dp dsu trees Statement C Codeforces Beta Round 84 (Div. 1 Only) {109} PROGRAMMING Tutorial 2000
4107 Spiders dp greedy trees Statement F School Regional Team Contest, Saratov, 2011 {120} PROGRAMMING Tutorial for school regional team contest of Saratov 1500
802 Maze dfs and similar dp probabilities trees Statement E Codeforces Beta Round 92 (Div. 1 Only) {123} PROGRAMMING Codeforces Beta Round #92 - Analysis 2600
565 Garden bitmasks dp graphs trees Statement E Codeforces Round 108 (Div. 2) {152} PROGRAMMING Разбор задач Codeforces Round #108 (Div. 2) 2400
19042 Distance in Tree dfs and similar dp trees Statement D VK Cup 2012 Round 1 {161} PROGRAMMING VK Cup 2012 Round 1: editorial 1800
2164 e-Government data structures dfs and similar dp strings trees Statement E VK Cup 2012 Round 2 {163} PROGRAMMING VK Cup 2012 Round 2 — Разбор 2800
2188 IT Restaurants dfs and similar dp trees Statement E VK Cup 2012 Finals (unofficial online-version) {212} PROGRAMMING 1800
12413 Choosing Capital for Treeland dfs and similar dp graphs trees Statement D Codeforces Round 135 (Div. 2) {219} PROGRAMMING User editorial for Codeforces Round #135 (Div. 2) 1900
2310 Cactus data structures dfs and similar dp graphs trees Statement E Codeforces Round 143 (Div. 2) {231} PROGRAMMING Tutorial Codeforces Round #143 2400
1362 World Eater Brothers dfs and similar dp greedy trees Statement C Codeforces Round 148 (Div. 1) {238} PROGRAMMING Editorial for Codeforces Round #148 2200
205 Tree and Table dfs and similar dp implementation trees Statement E Codeforces Round 153 (Div. 1) {251} PROGRAMMING Editorial of Codeforces Round #153 3000
5559 Zero Tree dfs and similar dp greedy trees Statement B Codeforces Round 168 (Div. 1) {274} PROGRAMMING Codeforces Round #168 Editorial 2000
1112 Shaass the Great dp trees Statement E Codeforces Round 178 (Div. 2) {294} PROGRAMMING Codeforces Round #178 Editorial 2700
6543 Kalila and Dimna in the Logging Industry dp geometry Statement C Codeforces Round 189 (Div. 1) {319} PROGRAMMING Codeforces Round #189 — Editorial 2400
6878 Book of Evil dfs and similar divide and conquer dp trees Statement D Codeforces Round 196 (Div. 2) {337} PROGRAMMING Codeforces Round #196 — Problems Analysis 2100
511 Pilgrims dfs and similar dp trees Statement E Codeforces Round 202 (Div. 1) {348} PROGRAMMING Editorial for Codeforces Round #202 2800
987 Inna and Sequence binary search data structures dp trees Statement D Codeforces Round 220 (Div. 2) {374} PROGRAMMING Codeforces Round #220 (Div. 2) разбор 2300
1029 Guess the Tree bitmasks constructive algorithms dp greedy trees Statement C Codeforces Round 245 (Div. 1) {429} PROGRAMMING Codeforces Round #245 — Editorial 2400
29622 k-Tree dp implementation trees Statement C Codeforces Round 247 (Div. 2) {431} PROGRAMMING Editorial Codeforces Round #247 (Div. 2) 1600
939 Berland Federalization dp trees Statement D Testing Round 10 {440} PROGRAMMING 2600
6814 A Lot of Games dfs and similar dp games implementation strings trees Statement B Codeforces Round 260 (Div. 1) {455} PROGRAMMING Codeforces Round #260 — Editorial 2100
6447 Civilization dfs and similar dp dsu ternary search trees Statement C Codeforces Round 260 (Div. 1) {455} PROGRAMMING Codeforces Round #260 — Editorial 2200
126 An easy problem about trees dp games greedy trees Statement F MemSQL Start[c]UP 2.0 - Round 2 {457} PROGRAMMING MemSQL Start[c]UP 2.0 Round 1 and 2 Editorials 3000
6975 Appleman and Tree dfs and similar dp trees Statement B Codeforces Round 263 (Div. 1) {461} PROGRAMMING Tutorial 2200
4143 Pillars binary search data structures dp sortings trees Statement E Codeforces Round 271 (Div. 2) {474} PROGRAMMING Codeforces Round #271 (Div. 2) Editorial 2200
590 Random Function and Tree combinatorics dp trees Statement D Codeforces Round 275 (Div. 1) {482} PROGRAMMING Codeforces Round #275 Editorial 2600
4375 Valid Sets dfs and similar dp math trees Statement D Codeforces Round 277 (Div. 2) {486} PROGRAMMING Codeforces Round #277(Div. 2) Editorial 2300
1906 Treeland Tour data structures dfs and similar dp trees Statement F Codeforces Round 279 (Div. 2) {490} PROGRAMMING Codeforces Round #279 (Div. 2) Editorial 2500
667 Birthday data structures dfs and similar dp trees Statement D Codeforces Round 282 (Div. 1) {494} PROGRAMMING 15148 2700
1133 Fox And Travelling dp trees Statement D Codeforces Round 290 (Div. 1) {512} PROGRAMMING 2900
1521 Drazil and Morning Exercise dfs and similar dp dsu trees two pointers Statement D Codeforces Round 292 (Div. 1) {516} PROGRAMMING 16468 2800
8296 A and B and Lecture Rooms binary search data structures dfs and similar dp trees Statement E Codeforces Round 294 (Div. 2) {519} PROGRAMMING 2300
18755 Reposts *special dfs and similar dp graphs trees Statement A VK Cup 2015 - Qualification Round 1 {522} PROGRAMMING Разбор задач VK Cup 2015 — Квалификация 1 1700
2683 Work Group dfs and similar dp graphs strings trees Statement B VK Cup 2015 - Round 2 (unofficial online mirror, Div. 1 only) {533} PROGRAMMING 2000
1634 Demiurges Play Again dfs and similar dp math trees Statement E Codeforces Round 300 {538} PROGRAMMING Codeforces Round #300 Editorial (+challenges) 2200
3234 Road Improvement dp trees Statement D Codeforces Round 302 (Div. 1) {543} PROGRAMMING Editorial Codeforces Round #302 2300
32719 Woodcutters dp greedy Statement C Codeforces Round 303 (Div. 2) {545} PROGRAMMING Codeforces Round #303 (Div.2) editorial 1500
1211 Ann and Half-Palindrome data structures dp graphs string suffix structures strings trees Statement E Codeforces Round 311 (Div. 2) {557} PROGRAMMING Codeforces Round #311 (Div.2) Editorial 2700
1029 Zublicanes and Mumocrates dp trees two pointers Statement F Codeforces Round 322 (Div. 2) {581} PROGRAMMING Codeforces Round #322 (Div.2) Editorial 2600
2953 Super M dfs and similar dp graphs trees Statement D Codeforces Round 328 (Div. 2) {592} PROGRAMMING Codeforces Round #328 Problem Analysis 2200
728 Wilbur and Trees dp math probabilities sortings Statement D Codeforces Round 331 (Div. 2) {596} PROGRAMMING Codeforces Round #331 Editorial 2500
760 Sandy and Nuts bitmasks dp trees Statement E Codeforces Round 332 (Div. 2) {599} PROGRAMMING Editorial Codeforces Round #332 (Div. 2) 2100
4005 Kingdom and its Cities dfs and similar divide and conquer dp graphs sortings trees Statement D Codeforces Round 339 (Div. 1) {613} PROGRAMMING Tutorial 2800
2459 Running Track dp greedy strings trees Statement C Codeforces Round 338 (Div. 2) {615} PROGRAMMING Codeforces Round #338 (Div. 2) editorial 1900
1876 Hamiltonian Spanning Tree dfs and similar dp graph matchings greedy trees Statement D Wunder Fund Round 2016 (Div. 1 + Div. 2 combined) {618} PROGRAMMING Wunder Fund Round 2016 Editorials 2200
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
1148 Famil Door and Roads combinatorics data structures dfs and similar dp probabilities trees Statement E Codeforces Round 343 (Div. 2) {629} PROGRAMMING Editorial of Codeforces Round #343 (Div.2) 2400
1372 The Chocolate Spree dfs and similar dp graphs trees Statement F Manthan, Codefest 16 {633} PROGRAMMING Manthan, Codefest 16: Editorials 2500
698 Bear and Destroying Subtrees dp math probabilities trees Statement E VK Cup 2016 - Round 3 {643} PROGRAMMING VK Cup 2016 — Round 3 — Editorial 2600
1592 Zip-line binary search data structures dp hashing Statement D Codeforces Round 345 (Div. 1) {650} PROGRAMMING Codeforces Round #345: editorial 2600
8066 Alyona and the Tree dfs and similar dp graphs trees Statement C Codeforces Round 358 (Div. 2) {682} PROGRAMMING 45491 1700
5314 Kay and Snowflake data structures dfs and similar dp trees Statement B Codeforces Round 359 (Div. 1) {685} PROGRAMMING Codeforces Round #359 Editorial 2000
4631 Connecting Universities dfs and similar dp graphs trees Statement B Codeforces Round 364 (Div. 1) {700} PROGRAMMING 46283 2100
4334 Centroids data structures dfs and similar dp graphs greedy trees Statement C AIM Tech Round 3 (Div. 1) {708} PROGRAMMING Editorial 2500
493 Andrew and Chemistry dp hashing trees Statement D Codeforces Round 373 (Div. 1) {718} PROGRAMMING Codeforces Round #373 — Editorial 2900
520 Uniformly Branched Trees combinatorics dp trees Statement F Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) {724} PROGRAMMING Tutorial 2800
5089 Anton and Tree dfs and similar dp trees Statement E Codeforces Round 379 (Div. 2) {734} PROGRAMMING Tutorial of Codeforces Round #379 (Div. 2) 2100
997 Ostap and Tree dp trees Statement E Codeforces Round 382 (Div. 2) {735} PROGRAMMING Codeforces Round #382 Editorial 2800
4706 Chloe and pleasant prizes dfs and similar dp graphs trees Statement D Codeforces Round 384 (Div. 2) {743} PROGRAMMING Codeforces Round #384 Editorial 1800
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
11854 Timofey and a tree dfs and similar dp dsu graphs implementation trees Statement A Codeforces Round 395 (Div. 1) {763} PROGRAMMING Codeforces Round #395 [Editorial] 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
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
3542 Bear and Tree Jumps dfs and similar dp trees Statement C VK Cup 2017 - Round 1 {771} PROGRAMMING VK Cup 2017 Round 1 and CF Round 405 — Editorial 2100
304 Problem of offices constructive algorithms dfs and similar dp trees Statement E Tinkoff Challenge - Elimination Round {793} PROGRAMMING 51685 2800
3224 Bank Hacking constructive algorithms data structures dp trees Statement C Codeforces Round 408 (Div. 2) {796} PROGRAMMING Tutorial 1900
7146 Police Stations constructive algorithms dfs and similar dp graphs shortest paths trees Statement D Codeforces Round 408 (Div. 2) {796} PROGRAMMING Tutorial 2100
733 Send the Fool Further! (medium) dp trees Statement J2 Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) {802} PROGRAMMING helvetic-coding-contest-2017-editorial.pdf 2100
726 Send the Fool Further! (medium) dp trees Statement K Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) {802} PROGRAMMING helvetic-coding-contest-2017-editorial.pdf 2100
368 Send the Fool Further! (hard) dfs and similar dp math trees Statement J3 Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) {802} PROGRAMMING helvetic-coding-contest-2017-editorial.pdf 2400
364 Send the Fool Further! (hard) dfs and similar dp math trees Statement L Helvetic Coding Contest 2017 online mirror (teams allowed, unrated) {802} PROGRAMMING helvetic-coding-contest-2017-editorial.pdf 2800
1552 Expected diameter of a tree binary search brute force dfs and similar dp sortings trees Statement D Codeforces Round 411 (Div. 1) {804} PROGRAMMING Codeforces Round #411 Editorial 2600
2576 An overnight dance in discotheque dfs and similar dp geometry greedy trees Statement D Codeforces Round 418 (Div. 2) {814} PROGRAMMING Codeforces Round #418 (Div. 2) Editorial 2000
3282 Karen and Supermarket brute force dp trees Statement C Codeforces Round 419 (Div. 1) {815} PROGRAMMING Codeforces Round #419 Editorial 2500
977 Singer House combinatorics dp graphs trees Statement D Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 2800
338 Perpetual Motion Machine constructive algorithms dp graphs implementation math trees Statement E Codeforces Round 424 (Div. 1, rated, based on VK Cup Finals) {830} PROGRAMMING Codeforces Round #424 Editorial 3100
1233 Roads in the Kingdom dfs and similar dp graphs trees Statement F Codeforces Round 427 (Div. 2) {835} PROGRAMMING Editorial 2400
20001 Journey dfs and similar dp graphs probabilities trees Statement C Codeforces Round 428 (Div. 2) {839} PROGRAMMING Codeforces Round #428 editorial 1500
2397 Helga Hufflepuff's Cup dp trees Statement C Manthan, Codefest 17 {855} PROGRAMMING 54750 2000
281 Harry Vs Voldemort dfs and similar dp graphs trees Statement G Manthan, Codefest 17 {855} PROGRAMMING 54750 3000
1121 Third Month Insanity dp probabilities trees Statement D MemSQL Start[c]UP 3.0 - Round 1 {859} PROGRAMMING Tutorial 2100
564 Policeman and a Tree dp graphs trees Statement E Codeforces Round 438 by Sberbank and Barcelona Bootcamp (Div. 1 + Div. 2 combined) {868} PROGRAMMING 55046 2600
236 Sloth dfs and similar dp graph matchings trees Statement D Codeforces Round 446 (Div. 1) {891} PROGRAMMING Codeforces Round #446 Editorial 3000
3057 Ralph and Mushrooms dp graphs Statement E Codeforces Round 447 (Div. 2) {894} PROGRAMMING Codeforces Round #447 (Div.2 Only) Editorial 2400
277 Ember and Storm's Tree Game combinatorics dp games trees Statement H Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined) {914} PROGRAMMING Tutorial 2900
1462 Stranger Trees dp math matrices trees Statement D Codeforces Round 459 (Div. 1) {917} PROGRAMMING Codeforces Round #459 Editorial 2600
1966 Tree binary search dp trees Statement D ICM Technex 2018 and Codeforces Round 463 (Div. 1 + Div. 2, combined) {932} PROGRAMMING 57796 2200
977 Fafa and Ancient Mathematics dfs and similar dp trees Statement E Codeforces Round 465 (Div. 2) {935} PROGRAMMING editorial 2500
1960 Heaps dp trees Statement F Codeforces Round 471 (Div. 2) {955} PROGRAMMING Editorial 2800
2264 Alternating Tree combinatorics dfs and similar divide and conquer dp probabilities trees Statement E Divide by Zero 2018 and Codeforces Round 474 (Div. 1 + Div. 2, combined) {960} PROGRAMMING Divide by Zero 2018 and Codeforces Round #474 (Div. 1 + Div. 2, combined) Editorial 2200
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
1872 Short Code data structures dp greedy strings trees Statement E Codeforces Round 476 (Div. 2) [Thanks, Telegram!] {965} PROGRAMMING Analysis of Codeforces Round #476 (Div. 2) [Thanks, Telegram!] 2500
2171 Kuro and GCD and XOR and SUM binary search bitmasks brute force data structures dp dsu greedy math number theory strings trees Statement D Codeforces Round 482 (Div. 2) {979} PROGRAMMING 1750.0 Codeforces Round #482 (Div. 2) Editorial 2200
215 Cactus to Tree dp graphs trees Statement F Codeforces Round 480 (Div. 2) {980} PROGRAMMING Tutorial 2900
15741 Cut 'em all! dfs and similar dp graphs greedy trees Statement C Codeforces Round 484 (Div. 2) {982} PROGRAMMING Editorial 1500
2295 GCD Counting divide and conquer dp dsu number theory trees Statement G Educational Codeforces Round 45 (Rated for Div. 2) {990} PROGRAMMING Educational Codeforces Round 45 Editorial 2400
1055 Flow Control dfs and similar dp greedy trees Statement F Educational Codeforces Round 45 (Rated for Div. 2) {990} PROGRAMMING Educational Codeforces Round 45 Editorial 2500
1603 Cowmpany Cowmpensation combinatorics dp math trees Statement F Codeforces Round 492 (Div. 1) [Thanks, uDebug!] {995} PROGRAMMING Editorial for Codeforces Round #492 [Thanks u-Debug!] 2700
14382 Cutting dp greedy sortings Statement B Codeforces Round 493 (Div. 2) {998} PROGRAMMING Codeforces Round #493 — Editorial 1200
711 Two-Paths data structures dp trees Statement G Educational Codeforces Round 46 (Rated for Div. 2) {1000} PROGRAMMING 60288 2800
1232 Sonya and Ice Cream binary search data structures dp greedy shortest paths trees Statement E Codeforces Round 495 (Div. 2) {1004} PROGRAMMING 60443 2400
1024 Road Projects dfs and similar dp trees Statement F Educational Codeforces Round 48 (Rated for Div. 2) {1016} PROGRAMMING Разбор Educational Codeforces Round 48 2600
4113 Recovering BST brute force dp math number theory trees Statement D Codeforces Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) {1025} PROGRAMMING Codeforces Round #505 Editorial 2000
1138 Vasya and Maximum Matching dp trees Statement F Technocup 2019 - Elimination Round 3 {1032} PROGRAMMING Codeforces Round #522 and Technocup 2019 Elimination Round 3 Editorial 2600
992 Region Separation combinatorics dp number theory trees Statement C Codeforces Round 511 (Div. 1) {1034} PROGRAMMING Codeforces Round #511 Editorial 2900
2296 You Are Given a Tree data structures dp trees Statement D Codeforces Round 507 (Div. 1, based on Olympiad of Metropolises) {1039} PROGRAMMING 61668 2700
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
1619 Split the Tree binary search data structures dp greedy trees Statement E Codeforces Round 514 (Div. 2) {1059} PROGRAMMING Codeforces Round #514 (Div. 2) Editorial 2400
3491 Sergey and Subway dfs and similar dp trees Statement E Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) {1060} PROGRAMMING User editorial for Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) 2000
1324 Up and Down the Tree dfs and similar dp trees Statement F Educational Codeforces Round 52 (Rated for Div. 2) {1065} PROGRAMMING Educational Codeforces Round 52 Editorial 2500
552 Random Forest Rank dp graph matchings math trees Statement E Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!] {1067} PROGRAMMING Tutorial 2800
592 Choosing Two Paths dfs and similar dp greedy trees Statement F Educational Codeforces Round 53 (Rated for Div. 2) {1073} PROGRAMMING 62742 2800
532 Speed Dial dp strings trees Statement F Educational Codeforces Round 55 (Rated for Div. 2) {1082} PROGRAMMING 63544 2900
6239 The Fair Nut and the Best Path data structures dp trees Statement A Codeforces Round 526 (Div. 1) {1083} PROGRAMMING 63753 1800
1614 Ehab and a component choosing problem dp greedy math trees Statement E Codeforces Round 525 (Div. 2) {1088} PROGRAMMING Codeforces round #525 editorial 2400
10716 Tree with Maximum Cost dfs and similar dp trees Statement F Codeforces Round 527 (Div. 3) {1092} PROGRAMMING Codeforces Round #527 (Div. 3) Editorial 2100
1052 Vladislav and a Great Legend combinatorics dp trees Statement G Hello 2019 {1097} PROGRAMMING 64310 2900
1033 Cookies binary search data structures dfs and similar dp games trees Statement F Codeforces Round 530 (Div. 2) {1099} PROGRAMMING E 2300
5406 GCD Counting data structures dfs and similar dp number theory trees Statement D Educational Codeforces Round 58 (Rated for Div. 2) {1101} PROGRAMMING 64483 2000
1499 Sasha and Interesting Fact from Graph Theory brute force combinatorics dp math trees Statement D Codeforces Round 539 (Div. 1) {1109} PROGRAMMING Codeforces Round #539 Editorial 2600
1091 Tree data structures dfs and similar dp graphs trees Statement E CodeCraft-19 and Codeforces Round 537 (Div. 2) {1111} PROGRAMMING CodeCraft-19 and Codeforces Round #537 (Div. 2) Editorial 2800
630 Tree Cutting (Hard Version) combinatorics dfs and similar dp trees Statement F2 Codeforces Round 540 (Div. 3) {1118} PROGRAMMING 65396 2700
875 Niyaz and Small Degrees data structures dp trees Statement F Codeforces Global Round 2 {1119} PROGRAMMING Codeforces Global Round 2 Editorial 2900
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
1226 Greedy Subsequences data structures dp trees Statement G Educational Codeforces Round 61 (Rated for Div. 2) {1132} PROGRAMMING T 2600
3718 Lynyrd Skynyrd data structures dfs and similar dp math trees Statement B Codeforces Round 549 (Div. 1) {1142} PROGRAMMING Codeforces Round #549 Editorial 2300
1337 Leaf Partition dp trees Statement F Forethought Future Cup - Elimination Round {1146} PROGRAMMING 66639 2400
2577 Neko and Aki's Prank dp greedy trees Statement D Codeforces Round 554 (Div. 2) {1152} PROGRAMMING T 2000
5521 Serval and Rooted Tree binary search dfs and similar dp greedy trees Statement D Codeforces Round 551 (Div. 2) {1153} PROGRAMMING Editorial 1800
4642 0-1-Tree dfs and similar divide and conquer dp dsu trees Statement D Educational Codeforces Round 64 (Rated for Div. 2) {1156} PROGRAMMING 66827 2300
435 Anagram Paths dp implementation trees Statement D Codeforces Round 562 (Div. 1) {1168} PROGRAMMING Codeforces Round #562 — Editorial 2900
4403 Nauuo and Circle combinatorics dfs and similar dp trees Statement B Codeforces Round 564 (Div. 1) {1172} PROGRAMMING Codeforces Round #564 Editorial 2000
4517 Minimal Segment Cover data structures dfs and similar divide and conquer dp greedy implementation trees Statement E Educational Codeforces Round 66 (Rated for Div. 2) {1175} PROGRAMMING Editorial 2200
1035 Fedor Runs for President data structures dp trees Statement D Codeforces Round 569 (Div. 1) {1179} PROGRAMMING Editorial of Round #569 2600
1001 Complete Mirror constructive algorithms dfs and similar dp hashing implementation trees Statement D Codeforces Round 566 (Div. 2) {1182} PROGRAMMING 67614 2500
11193 Tree Painting dfs and similar dp trees Statement E Educational Codeforces Round 67 (Rated for Div. 2) {1187} PROGRAMMING Разбор Educational Codeforces Round 67 2000
507 Magic Tree *special data structures dp trees Statement B CEOI 2019 day 2 online mirror (unrated, IOI format) {1193} PROGRAMMING T
57 Road Repair in Treeland *special binary search dp trees Statement H Kotlin Heroes: Episode 2 {1211} PROGRAMMING Kotlin Heroes: Episode 2 Editorial 3000
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
2887 Paint the Tree dp sortings trees Statement E Technocup 2020 - Elimination Round 1 {1223} PROGRAMMING Сodeforces Round 591 (and Technocup 2020 — Elimination Round 1) Editorial 2200
1519 Balanced Binary Search Trees dp math Statement E Codeforces Global Round 5 {1237} PROGRAMMING T 2400
2051 The Maximum Subtree dfs and similar dp graphs trees Statement F Educational Codeforces Round 74 (Rated for Div. 2) {1238} PROGRAMMING Educational Codeforces Round 74 Editorial 2300
8293 Paint the Tree brute force constructive algorithms dp graphs implementation trees Statement D Codeforces Round 592 (Div. 2) {1244} PROGRAMMING Codeforces Round #592 (Div. 2) Tutorial 1700
2730 Maximum Weight Subset dp trees Statement F Codeforces Round 595 (Div. 3) {1249} PROGRAMMING Codeforces Round #595 (Div. 3) Editorial 2500
585 Cleaning Robots dp trees Statement B 2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) {1252} PROGRAMMING T 2600
410 Find String in a Grid data structures dp strings trees Statement D 2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) {1252} PROGRAMMING T 2900
949 Economic Difficulties data structures dfs and similar dp flows graphs trees Statement F Codeforces Round 603 (Div. 2) {1263} PROGRAMMING Разбор Codeforces Round #603 (Div. 2) 2500
671 Tree Elimination dp trees Statement D Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4) {1276} PROGRAMMING Technocup 2020 — Elimination Round 4 + Codeforces Round 606: Editorial 2600
1228 Miss Punyverse dp greedy trees Statement D Codeforces Round 607 (Div. 1) {1280} PROGRAMMING Codeforces Round #607 Editorial 2700
8588 Dr. Evil Underscores bitmasks brute force dfs and similar divide and conquer dp greedy strings trees Statement D Codeforces Round 613 (Div. 2) {1285} PROGRAMMING Codeforces Round #613 (Div. 2) Editorial 1800
2000 Delete a Segment brute force constructive algorithms data structures dp graphs sortings trees two pointers Statement E Codeforces Round 613 (Div. 2) {1285} PROGRAMMING Codeforces Round #613 (Div. 2) Editorial 2300
2250 Xenon's Attack on the Gangs combinatorics dfs and similar dp greedy trees Statement C Codeforces Round 614 (Div. 1) {1292} PROGRAMMING 1250.0 Codeforces Round #614 Editorial 2300
966 Chaotic V. dp graphs greedy math number theory trees Statement D Codeforces Round 614 (Div. 1) {1292} PROGRAMMING 1750.0 Codeforces Round #614 Editorial 2700
6810 Three Paths on a Tree dfs and similar dp greedy trees Statement F Codeforces Round 615 (Div. 3) {1294} PROGRAMMING Codeforces Round #615 (Div. 3) Editorial 2100
528 Around the World bitmasks combinatorics dfs and similar dp graphs graphs math trees Statement D Codeforces Round 618 (Div. 1) {1299} PROGRAMMING 1750.0 Codeforces Round #618 Editorial 2900
162 Assigning Fares dp dp dp trees Statement F Codeforces Round 626 (Div. 1, based on Moscow Open Olympiad in Informatics) {1322} PROGRAMMING 3000.0 Codeforces Round #626 Editorial
12957 Maximum White Subtree dfs and similar dp graphs trees Statement F Codeforces Round 627 (Div. 3) {1324} PROGRAMMING Codeforces Round #627 (Div. 3) Editorial
108 Spiderweb Trees dp geometry trees Statement G Codeforces Global Round 7 {1326} PROGRAMMING 4000.0 74961 3600
1127 Independent Set dfs and similar dp trees Statement F Codeforces Round 630 (Div. 2) {1332} PROGRAMMING 2250.0 Codeforces Round #630 Editorial 2500
24558 Linova and Kingdom dfs and similar dp greedy sortings trees Statement A Codeforces Round 635 (Div. 1) {1336} PROGRAMMING 500.0 Codeforces Round #635 Editorial 1700
1123 Nested Rubber Bands dfs and similar dp trees Statement D Codeforces Round 633 (Div. 1) {1338} PROGRAMMING 2000.0 Editorial
7484 Tree Shuffling dfs and similar dp dsu greedy trees Statement E Codeforces Round 646 (Div. 2) {1363} PROGRAMMING 2250.0 78202 2000
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
9216 TediousLee dp graphs greedy math matrices trees Statement D Codeforces Round 652 (Div. 2) {1369} PROGRAMMING 2000.0 Codeforces Round #652 (Div. 2) Editorial 1900
472 Inverse Genealogy constructive algorithms divide and conquer dp math trees Statement E Codeforces Round 657 (Div. 2) {1379} PROGRAMMING 2500.0 Codeforces Round #657 Editorial 2400
821 The Majestic Brown Tree Snake dfs and similar dp greedy trees two pointers Statement D Codeforces Round 658 (Div. 1) {1381} PROGRAMMING 2500.0 Codeforces Round #658 Editorial 3000
661 String Transformation 2 dp graphs trees Statement C Codeforces Round 659 (Div. 1) {1383} PROGRAMMING 1750.0 Codeforces Round #659 Editorial
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
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
1221 Boboniu and Jianghu dp greedy sortings trees Statement D Codeforces Round 664 (Div. 1) {1394} PROGRAMMING 1750.0 Codeforces Round #664 Editorial 2800
233 Star Trek *special combinatorics dfs and similar dp games graphs matrices trees Statement C Central-European Olympiad in Informatics, CEOI 2020, Day 1 (IOI, Unofficial Mirror Contest, Unrated) {1402} PROGRAMMING Editorial
8159 Tree Tag dfs and similar dp games trees Statement B Codeforces Round 668 (Div. 1) {1404} PROGRAMMING 1000.0 Codeforces Round #668 Editorial
780 Black, White and Grey Tree dp trees Statement E Codeforces Round 681 (Div. 1, based on VK Cup 2019-2020 - Final) {1442} PROGRAMMING 1750.0 84298
166 Finding the Vertex brute force dfs and similar dp interactive trees Statement E Codeforces Round 680 (Div. 1, based on Moscow Team Olympiad) {1444} PROGRAMMING 3000.0 Codeforces Round #680 Editorial
4077 Xor Tree binary search bitmasks data structures divide and conquer dp trees Statement C Codeforces Round 683 (Div. 1, by Meet IT) {1446} PROGRAMMING 1250.0 E
349 Communism bitmasks dp trees Statement G Codeforces Global Round 12 {1450} PROGRAMMING 3750.0 Codeforces Global Round 12 Editorial
2216 Dog Snacks binary search dfs and similar dp greedy trees Statement E Codeforces Round 688 (Div. 2) {1453} PROGRAMMING 2500.0 Codeforces Round #688 (Div. 2) Editorial
725 AB Tree dp greedy trees Statement F Codeforces Round 699 (Div. 2) {1481} PROGRAMMING 3000.0 Codeforces Round #699 (Div. 2) Editorial
1523 Move and Swap dp greedy trees Statement E Codeforces Round 701 (Div. 2) {1485} PROGRAMMING 2500.0 Editorial of Codeforces Round #701 (Div. 2) 2500
1053 Christmas Game data structures dfs and similar dp games math trees Statement F CodeCraft-21 and Codeforces Round 711 (Div. 2) {1498} PROGRAMMING 3000.0 CodeCraft-21 and Codeforces Round #711 (Div. 2) Editorial
1581 Diameter Cuts dfs and similar dp trees Statement F Educational Codeforces Round 106 (Rated for Div. 2) {1499} PROGRAMMING Educational Codeforces Round 106 Editorial
590 Reunion dp trees Statement F Contest 2050 and Codeforces Round 718 (Div. 1 + Div. 2) {1517} PROGRAMMING 3000.0 Contest 2050 and Codeforces Round #718 (Div.1 + Div.2) 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
18868 Parsa's Humongous Tree brute force dfs and similar dp greedy trees Statement A Codeforces Round 722 (Div. 1) {1528} PROGRAMMING 750.0 Codeforces Round #722 Editorial
600 Mashtali and Hagh Trees combinatorics dp trees Statement E Codeforces Round 722 (Div. 1) {1528} PROGRAMMING 2750.0 Codeforces Round #722 Editorial
255 Lost Nodes dp graphs interactive sortings trees Statement H Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) {1534} PROGRAMMING 3500.0 Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) Editorial
2983 Tree Array brute force combinatorics dp math probabilities trees Statement B Codeforces Round 728 (Div. 1) {1540} PROGRAMMING 1250.0 Tutorial
3521 How Many Paths? dfs and similar dp graphs trees Statement G Codeforces Round 731 (Div. 3) {1547} PROGRAMMING Codeforces Round #731 (Div. 3) Editorial
895 Jumping Around data structures divide and conquer dp dsu graphs shortest paths trees Statement F Educational Codeforces Round 111 (Rated for Div. 2) {1550} PROGRAMMING Educational Codeforces Round 111 Editorial
2167 Equidistant Vertices combinatorics dfs and similar dp trees Statement F Codeforces Round 734 (Div. 3) {1551} PROGRAMMING Editorial for Codeforces Round #734 (Div.3)
828 XOR and Distance bitmasks divide and conquer dp trees Statement H Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2) {1553} PROGRAMMING 3750.0 Harbour.Space Scholarship Contest 2021-2022 (Div. 1 + Div. 2) Editorial
1276 Mathematics Curriculum combinatorics dp trees Statement B Codeforces Round 745 (Div. 1) {1580} PROGRAMMING 1000.0 Codeforces Round #745 Editorial 2600
1098 Subsequence divide and conquer dp trees Statement D Codeforces Round 745 (Div. 1) {1580} PROGRAMMING 2000.0 Codeforces Round #745 Editorial 2900
302 Poachers dp games graphs trees Statement G Technocup 2022 - Elimination Round 3 {1585} PROGRAMMING 3500.0 Codeforces Round #759 (Div. 2, based on Technocup 2022 Elimination Round 3) Editorial
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
1606 Rubik's Cube Coloring (hard version) brute force dp implementation math trees Statement E2 Codeforces Round 747 (Div. 2) {1594} PROGRAMMING 1500.0 95525 2300
594 Phys Ed Online data structures dp greedy trees Statement E Codeforces Round 751 (Div. 1) {1601} PROGRAMMING 2250.0 95865 2900
661 Tree Queries binary search data structures dp dsu geometry trees Statement F Educational Codeforces Round 116 (Rated for Div. 2) {1606} PROGRAMMING 96454
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
1696 Purple Crayon dp games greedy math trees Statement E Codeforces Global Round 18 {1615} PROGRAMMING 2750.0 Global Round 18 Editorial
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)
1148 Cats on the Upgrade (easy version) data structures dfs and similar divide and conquer dp graphs trees Statement E1 Codeforces Round 765 (Div. 2) {1625} PROGRAMMING 2000.0 Editorial of Codeforces Round #765 (Div. 2)
1852 Black and White Tree dp greedy trees Statement E Educational Codeforces Round 121 (Rated for Div. 2) {1626} PROGRAMMING 99136
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
2477 Star MST combinatorics dp math Statement E Educational Codeforces Round 125 (Rated for Div. 2) {1657} PROGRAMMING 101161
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
803 Centroid Probabilities combinatorics dp fft math Statement E Codeforces Round 783 (Div. 1) {1667} PROGRAMMING 2750.0 Codeforces Round #783 Editorial 3000
3162 Preorder combinatorics divide and conquer dp dsu hashing trees Statement E Educational Codeforces Round 127 (Rated for Div. 2) {1671} PROGRAMMING 102181
6238 Vlad and Unfinished Business dfs and similar dp greedy trees Statement F Codeforces Round 787 (Div. 3) {1675} PROGRAMMING 102550
23784 White-Black Balanced Subtrees dfs and similar dp graphs trees Statement G Codeforces Round 790 (Div. 4) {1676} PROGRAMMING Codeforces Round #790 (Div. 4) Editorial
2290 Unique Occurrences data structures dfs and similar divide and conquer dp dsu trees Statement F Educational Codeforces Round 129 (Rated for Div. 2) {1681} PROGRAMMING 103163 2300
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)
1130 K-Set Tree combinatorics dfs and similar dp math trees Statement F CodeCraft-22 and Codeforces Round 795 (Div. 2) {1691} PROGRAMMING 2750.0 Editorial for CodeCraft-22 and Codeforces Round #795 (Div. 2)
9565 Fake Plastic Trees dfs and similar dp greedy trees Statement B Codeforces Round 800 (Div. 1) {1693} PROGRAMMING 1000.0 Codeforces Round #800 Editorial 1700
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
5737 Passable Paths (hard version) bitmasks data structures dfs and similar dp sortings trees Statement G2 Codeforces Round 805 (Div. 3) {1702} PROGRAMMING 104763
889 Partial Virtual Trees combinatorics dp math trees Statement D Codeforces Round 808 (Div. 1) {1707} PROGRAMMING 1750.0 104930
6695 Xor-Subsequence (easy version) bitmasks brute force dp strings trees Statement D1 Codeforces Round 815 (Div. 2) {1720} PROGRAMMING 1500.0 Codeforces Round #815 (Div. 2) Editorial
2181 Xor-Subsequence (hard version) bitmasks data structures dp strings trees Statement D2 Codeforces Round 815 (Div. 2) {1720} PROGRAMMING 1000.0 Codeforces Round #815 (Div. 2) Editorial
595 Electrical Efficiency combinatorics data structures dp number theory trees Statement E COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1725} PROGRAMMING Tutorial
462 Journey dp trees Statement J COMPFEST 14 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) {1725} PROGRAMMING Tutorial
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
5102 Paths on the Tree dfs and similar dp greedy sortings trees Statement D Codeforces Global Round 23 {1746} PROGRAMMING 1500.0 Codeforces Global Round 23 Editorial
2645 Yet Another Array Counting Problem data structures divide and conquer dp trees Statement E Codeforces Round 833 (Div. 2) {1748} PROGRAMMING 2250.0 Codeforces Round #833 (Div. 2) Editorial 2300
1249 Algebra Flash bitmasks brute force dp graphs meet-in-the-middle trees Statement E Educational Codeforces Round 140 (Rated for Div. 2) {1767} PROGRAMMING 110225
1607 Koxia and Tree combinatorics dp math probabilities trees Statement E Good Bye 2022: 2023 is NEAR {1770} PROGRAMMING 2000.0 Good Bye 2022 -- Editorial
3205 Hossam and (sub-)palindromic tree brute force dfs and similar dp trees Statement D Codeforces Round 837 (Div. 2) {1771} PROGRAMMING 2250.0 Codeforces Round #837 (Div. 2) Editorial
3947 Two Chess Pieces dfs and similar dp greedy trees Statement E Polynomial Round 2022 (Div. 1 + Div. 2, Rated, Prizes!) {1774} PROGRAMMING 2000.0 Polynomial Round 2022 (Div. 1 + Div. 2) Editorial
4660 Score of a Tree bitmasks combinatorics dfs and similar dp probabilities trees Statement D Codeforces Round 845 (Div. 2) and ByteRace 2023 {1777} PROGRAMMING 2000.0 Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial
862 Maximizing Root dfs and similar dp graphs math trees Statement F Codeforces Round 848 (Div. 2) {1778} PROGRAMMING 2750.0 Codeforces Round #848 (Div. 2) Editorial
1401 Xorcerer's Stones constructive algorithms dp trees Statement F Hello 2023 {1779} PROGRAMMING 2250.0
1312 Bracket Insertion brute force combinatorics constructive algorithms dp math trees Statement F VK Cup 2022 - Отборочный раунд (Engine) {1781} PROGRAMMING 3250.0 Tutorial
1525 Labeling the Tree with Distances data structures dp hashing implementation trees Statement E Codeforces Round 856 (Div. 2) {1794} PROGRAMMING 2750.0 Codeforces Round 856 (Div. 2) Editorial
1028 Colored Subgraphs data structures dp greedy trees Statement E Educational Codeforces Round 144 (Rated for Div. 2) {1796} PROGRAMMING Educational Codeforces Round 144 Editorial
4627 Li Hua and Tree brute force data structures dfs and similar dp implementation trees Statement D Codeforces Round 864 (Div. 2) {1797} PROGRAMMING 1750.0 Codeforces Round 864 (Div. 2) Editorial
8917 A Wide, Wide Graph dfs and similar dp dsu greedy trees Statement D Codeforces Round 862 (Div. 2) {1805} PROGRAMMING 1750.0 Editorial of Codeforces Round #862 (Div. 2)
1733 The Fox and the Complete Tree Traversal constructive algorithms dp games implementation math trees Statement C Codeforces Round 866 (Div. 1) {1819} PROGRAMMING 1500.0 Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial