Last active
April 16, 2019 06:34
-
-
Save hmthanh/f8a10830eb81e941e768d9ee9ef9c977 to your computer and use it in GitHub Desktop.
Thuật toán FloyWarshall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph = vector<vector<int>>(length, vector<int>(length)); | |
for (int i = 0; i < length; i++){ | |
for (int j = 0; j < length; j++){ | |
file >> temp; | |
if (temp == 0 && i != j) { | |
graph[i][j] = INF; | |
} | |
else { | |
graph[i][j] = temp; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK