warshallFloyd(g): dist ← gの隣接行列 for k ← 0 to N-1: for i ← 0 to N-1: for j ← 0 to N-1: if dist[i][j] > dist[i][k] + dist[k][j]: dist[i][j] ← dist[i][k] + dist[k][j]