codechef jan cookoff 2015 (ANKMARKS) dijkstra
I was reading editorial editorial for problem here.There was a problem link here and editorial for that here. I got what is written in editorial but don't know why that works.Can anybody comment on correctness of algorithm.thanks.
CF Edu Round 173 Solution Discussion