Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

Mr.Awesome's blog

By Mr.Awesome, history, 11 years ago, In English

I'm getting WA in this 449B this is my submission

i implemented the dijkstra's algorithm to find shortest path between the capital and each city , and the result is stored in dist[] .

could anyone point out the problem , or tell me if my idea is wrong ??

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
11 years ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Did you considered that maybe the shortest path between capital and a city will use one train route and some other roads?