← 返回 meta 的题目列表Round-Trip Minimum Price
类型:online_judge
You are given a 2D array flights where flights[i] contains three integers [source, destination, price] representing a flight from source to destination with price. You are starting from city A and want to purchase a round-trip ticket, return the minimum cost of the round-trip ticket. Assume there is always a possible round-trip.
Example
Input
5
0 1 100
1 2 100
2 0 100
3 4 50
4 3 50