你的目标是:靠近编号为 1 的点。(准确地说,是找到从任意一个结点出发到第 1 个结点的最短距离)
建议改为
你的目标是:靠近编号为 1 的点。(准确的说,是对于每个点找到一个能够到达的点 j,使得从 1 出发到达该点距离最短,即 dj 最小)
原文:
Polycarp wants for each starting city i to find out how close he can get to the capital.
More formally : he wants to find the minimal value of dj that Polycarp can get from the city i to the city j according to the rules described above.