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 は常に、存在する最短パスを返します。