Interesting graph problem ICPC

sir ,what is the code for this problem,
I have tried but I could not get it

hello @mzk1994
a)
compute shortest distance from source to all other vertex using dijkastra (say costFromSrc)
b) and then compute shortest distance from destination to all other vertex using dijkastra (say costFromDest)
c) and then pick all possible vertex pair and take flight between them and compute the total cost and compare it with minimum fare so far and update

int minFare = costFromSrc["destVertex"];
for(int i = 0; i < V; i++) {
   for(int k = 0; k < V; k++) {
       minFare = min(minFare, costFromSrc[i] + costFromDest[k] + flightFare[i][k]);
   }
}

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.