百度地图导航 2017 计蒜之道 复赛

https://nanti.jisuanke.com/t/A1244

way 1:

城市群之间的高速路

建立一个虚拟节点z

all points to z : 0

z to all points : c

way 2:

dijkstra+优先队列

记录城市群中的点中是否存在一个点已经遍历,

对于第一个点,dist of 城市群中的其它点 +c ; 对于其它点,认为没有这条长度为c的路径。

原文地址:https://www.cnblogs.com/cmyg/p/11144654.html