Skip to content

Instantly share code, notes, and snippets.

@hmthanh
Last active April 16, 2019 06:34
Show Gist options
  • Save hmthanh/f8a10830eb81e941e768d9ee9ef9c977 to your computer and use it in GitHub Desktop.
Save hmthanh/f8a10830eb81e941e768d9ee9ef9c977 to your computer and use it in GitHub Desktop.
Thuật toán FloyWarshall
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;
}
}
}
@hmthanh
Copy link
Author

hmthanh commented Apr 16, 2019

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment