Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于 Floyd-Warshall 算法,循环的顺序是 k、i 和 j。如果我把循环的顺序搞砸了,不小心把它写成 i、k 和 j,会发生什么?该程序以何种方式不起作用?谢谢!
没有什么。如果您在运行时没有篡改该 3 级迭代,它会为您提供结果。Floyd-Warshall 总是返回最短的路径。