Icpc trip graph problem

send the link of this problem…

hello @shampblocks
this problem is not there on the hackerblocks.
search on codechef ,most probably u will find it there.

can you send the link of this problem??

i dont have it, neither it is available on hackerblocks.

most of the ICPC rounds are conducted over codechef.
so search on codechef for this problem

according to the solution in video what will be the time complexity of it??

it will be same as dijkastras

but we are doing dijektras two times and also we are finding x and y and we have to find the pair x and y isn’t it take +V^2 time??

no .
after applying dijkastra twice,
we just have to traverse each edge (say u —v)
then using dijkastra table we will find
cost src…u + cost v…dest + cost u…v

So it will be Vlog(E) +E??

yeah …

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.