ICPC trip - interesting graph problem!

Please check the code is it right and explain the complexity discussion part as said in video i don’t get it.

@Rakshitgarg99 your code looks fine,but i don’t know the exact question so could you send me question link where you are submitting this problem so that i can check it correctly.

I also don’t have question link thought you have it. Beside that explain the complexity part discuss in video i don’t get some parts of it can you explain me.

from what i get from the video is you have to go delhi or amrita puri from given cities.so instead of applying Dijkstra from all cities to reach delhi or amrita puri,if you take delhi or amritapuri as source you need to apply dijkstra for only two times, so if you apply dikstra from all cities it will be V times (ElogV) time, but in this case it will be 2 ElogV.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.