You are viewing a single comment's thread. Return to all comments →
Main difference of TLE and pass of case 5 and 6 are just the use of min for python 3, any early termination won't save you if min is used
TLE
dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]) or if dist[i][k] != float('inf') and dist[k][j] != float('inf'): dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])
Pass
if dist[i][j] > dist[i][k] + dist[k][j]: dist[i][j] = dist[i][k] + dist[k][j]
Seems like cookies are disabled on this browser, please enable them to open this website
Floyd : City of Blinding Lights
You are viewing a single comment's thread. Return to all comments →
Main difference of TLE and pass of case 5 and 6 are just the use of min for python 3, any early termination won't save you if min is used
TLE
Pass