Problem "Returning Home" (1422D), TLE on Test 5

Правка en1, от ynnuface, 2020-10-10 12:30:06

Basically for every node I calculate the 4 closest nodes in all four directions, so the number of edges should be at most 4*M, right?

After that I run Dijkstra but for some reason I get TLE on test 5, I spent a lot of hours trying to see why but with no success, that's why I'm asking for some help, I just don't know what's wrong with my implementation.

Code link: https://codeforces.net/contest/1422/submission/95066276

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский ynnuface 2020-10-10 13:07:19 407
en1 Английский ynnuface 2020-10-10 12:30:06 474 Initial revision (published)