Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

USP 2015 tryouts problem D : Random walk in Thailand
Difference between en1 and en2, changed 257 character(s)
Hi guys,↵
As I got time from footaball I was practicing competitive coding. I was doing this problem from Gym contest.↵

This[Link to problem](http://codeforces.com/gym/101047/problem/D).↵

I came to know that there is no way to see test cases in Gym contest.↵

I want to know What mistake I am making also I will appreciate any other solution.↵

[This is my code](http://ideone.com/ZKRaUL) which fails on second test.

My approach is first run dijkstra from n'th city and find shortest path theough boat for each city. Then for each city we can choose between Average+k or its original shortest path. So I try to minimize the average and find minimum value for first vertex.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English shas20 2016-10-20 00:40:59 257
en1 English shas20 2016-10-20 00:33:38 474 Initial revision (published)