c++ floyd模板代码
2022-05-27 13:43
views:
818
source:
小高高123
#include<bits/stdc++.h>
using namespace std;
int g[1000][1000],n;
void floyd(){
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
for(int k=0;k<n;k++){
g[j][k]=min(g[j][i]+g[i][k],g[j][k]);
}
}
}
}
Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.