QUESTION-2 (250 points)
In India, there are n cities, numbered from 0 to n-1 . For each pair of cities (i,j), you are given the cost c[i][j] > 0 of flying directly from u to v. In particular there is a flight between every pair of cities.
Each such flight takes one day and flight costs are not necessarily symmetric (c[i][j] might not be equal to c[j][i]).
A new airline has started this offer of frequent flyer to gain attraction and travellers. In order to get the status, you have to travel at least minDays consecutive days.
Suppose you are in city u and you want to get to city v, you would like to use this opportunity to obtain the frequent flyer status.
What is the minimum total cost of a flight schedule that gets you from u to v in at least minDays days?
Constraints :
1 <= n, minDays <= 500
0 <= u, v < n
1 <= c[i][j] for any (i, j) <= 10^5
Example:
Given n = 3, u = 0, v = 2, minDays = 3
Output: 5
Explanation: minCost from 0 to 2 is 5 for path: 0-> 1 -> 2 -> 0 -> 1 -> 2. Since minDays depict the minimum air travels required to obtain frequent flyer status, although you can reach from 0 to 2 using path 0 -> 1 -> 2 with minCost = 2 but it only requires two air-travels thus it does not meet the minDays constraint.