Created
April 16, 2019 07:31
-
-
Save hmthanh/68ecc7c449525e14bfc320eff8d452c4 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
vector<int> pathS2E = vector<int>(); | |
while (start != end){ | |
pathS2E.push_back(end); | |
end = path[start][end]; | |
} | |
pathS2E.push_back(start); | |
for (vector<int>::iterator i = pathS2E.end(); i != pathS2E.begin(); i--) | |
{ | |
cout << *(i-1) << " "; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment