I am solving the CHICAGO problem using modified dijkstra’s algorithm and have tried it on many testcases so far , including the ones people have given to verify the solution , yet I keep getting a WA.
The code is as follows
[removed my code]
Can anyone please point out what I am doing wrong. A big thanks for helping me out.
Edit 1: Implemented the things that @simes suggested but it still gives a WA.
Edit 2 : Got an AC thanks to @simes . Thus removed my code.