help in 1063 B

Revision en1, by kumarpratyush4, 2019-05-16 23:34:52

https://codeforces.com/problemset/problem/1063/B this question can be done with djikstra as well. but dont know y its giving TLE. https://ideone.com/Az9ZAL (its properly commented -running and no templates are used so wont be tough to read) .using djikstra i am assigning 1 unit weight to all the left edges. if anyone can suggest any optimization i would be very thankful.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English kumarpratyush4 2019-05-17 10:39:41 75
en1 English kumarpratyush4 2019-05-16 23:34:52 391 Initial revision (published)