Shortest route 1 | CSES

Правка en1, от mkmeden, 2022-08-12 18:25:35

https://cses.fi/problemset/task/1671/

This is the task and at the first look its obvious that its a standard dijkstra problem, But due to some reason my code is giving TLE for 2 large test cases which I am sure the standard dijkstra code should be able to handle. Can someone take a look at this and provide some insight.

code

Failing TCs : https://cses.fi/file/6202e05529aba02706fe1c03ec7d07ed68c2e254b69047129b52185f875b9a1e/1/1/ https://cses.fi/file/a563cff68cf3d8ade012345cf49bc668cdb1f02f7a75317091066f81c0db16d5/1/1/

Теги graphs, dijkstra, cses

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский mkmeden 2022-08-12 18:28:30 3 (published)
en1 Английский mkmeden 2022-08-12 18:25:35 2012 Initial revision (saved to drafts)