PIPI是个精明的人,他总是想用最便宜的价格从起点坐车到终点,你能告诉PIPI从某个起点 s 到终点 t的最小花费是多少吗??
2
1 2 3 4 1 3 5 7
4 2
1
2
3
4
1 4
4 1
1 2 3 4 1 3 5 7
4 1
1
2
3
10
1 4
Case 1:
The minimum cost between station 1 and station 4 is 3.
The minimum cost between station 4 and station 1 is 3.
Case 2:
Station 1 and station 4 are not attainable.