title Link: Https://vjudge.net/contest/146629#problem/L
Title Description: There are n planets, starting at the first planet, seeking to travel all the planet's arrival time and minimum value
Problem Solving Process:
The time required for the first planet to reach the J Planet is T[i][j]
Processing the Floyd algorithm will give the minimum time required for Planet I to reach the J Planet:
for 1; K <= N; k++) for1; I <= N; i++) for1; J <= N; J + +) = min (T[i][k] + t[k][j], t[i][j]);
Then use DFS to search each planet.
Pruning:
① Current time + time required from the planet to all non-arrival planets < All time limits for the planet not arriving
② (important) current arrival time and + (n -reach planet number) * Current arrival time < known minimum result
Why does the Floyd algorithm put K on the outermost layer? ------Know https://www.zhihu.com/question/30955032
Floyd algorithm for calculating multi-source Shortest path-----