ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2085. Magic Programmer

Hints
Posted by decay 16 Feb 2019 23:41
1. This problem can be reduced to the following:
      Given X, find two vertices such that path weight is equal to X.
2. It probably cannot be solved with naiive DP. Use centroid decomposition.
3. std::unordered_map gets TL while std::map gets AC.