Help me to solve this graph problem

Правка en2, от Just_LOL, 2024-06-13 09:06:14

Problem link I used dijkstra's algorithm and when I get a new bicycle with minimum slowness factor or when I reached a city with minimum time I updated the distance array. This was my submission. But it didn't work. I saw many people use 2d distance array. But I can't figure out the intuition? Could you explain me the intuition. If there is any other way to do this could you comment that one too.

Теги graphs, help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Just_LOL 2024-06-13 09:06:14 5 Tiny change: 'his could me comment t' -> 'his could you comment t'
en1 Английский Just_LOL 2024-06-09 06:53:16 545 Initial revision (published)