不能
by Dispwnl @ 2018-10-27 19:21:35
比如说$1\rightarrow 2\rightarrow 4$是最短路($n=4$),$dis(1,2)=2,dis(2,4)=3$,还有$1\rightarrow 3\rightarrow 4$,$dis(1,3)=5,dis(2,4)=1$,$k=1$,选择第二条路显然是更优的
by Dispwnl @ 2018-10-27 19:24:19
用分层图来做不是挺好
by NaCly_Fish @ 2018-10-27 19:24:30
优化$dis(1,3)$
by Dispwnl @ 2018-10-27 19:24:43
另外感谢楼主,让我发现一道水积分的好题
by NaCly_Fish @ 2018-10-27 19:24:46
orz
by Dispwnl @ 2018-10-27 19:26:16
@[NaCly_Fish](/space/show?uid=115864) OTZ
by Southern_way @ 2018-10-27 19:33:54
@[Dispwnl](/space/show?uid=49206)
就是说有可能最短路的路径比较长对吧?
谢谢了
by Robert @ 2018-10-28 11:38:50