ABC208 D - Shortest Path Queries 2 (400)
ワーシャルフロイド法そのまんま
各
$ k
のループの計算終了時点毎に到達可能なペアの距離を和に加えていけば良い
明らかに
$ \mathcal{O}(N^3)
問題:
https://atcoder.jp/contests/abc208/tasks/abc208_d
提出:
https://atcoder.jp/contests/abc208/submissions/23962234
#ABC208
#400pt
#D
#ABC
#AtCoder
#ワーシャルフロイド法
#O(N^3)