1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-20 21:08:06 +00:00

Great Walls in bch

This commit is contained in:
Zeno Rogue
2021-07-11 15:07:40 +02:00
parent 53efc30bd5
commit e9de3ac7d5
5 changed files with 117 additions and 36 deletions

View File

@@ -739,4 +739,11 @@ EX void open_wiki(const char *title) {
open_url(url);
}
EX void floyd_warshall(vector<vector<char>>& v) {
int N = isize(v);
for(int k=0; k<N; k++)
for(int i=0; i<N; i++)
for(int j=0; j<N; j++)
v[i][j] = min<int>(v[i][j], v[i][k] + v[k][j]);
}
}