purple_dreams's blog

By purple_dreams, history, 8 years ago, In English

Here is the link: RoadOrFlightHard I got the solution but it takes dp[400000][40][2] which is very huge as far as memory is concerned. In the editorial they have added a line that city(i) calculation depends on city(i+1). I was not able to get that observation and I am not getting how to implement it. I saw one code but still did not understand. Thank You.

  • Vote: I like it
  • -8
  • Vote: I do not like it