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 1399. Economical Director

I have some thought on this problem:
Posted by Shen Yang 7 Dec 2016 14:25
first  use dynamic programming to find the minimum value of distance from 0 and visit 1~m once then to 0, we can get a chain 0--i1-i2--...-im--0

then we consider to cut this chain, use dynameic programming dp[i] to record distance.we cut first i node of the chain..
dp[m] is the result..

I'll try this idea...