Floyed模板——鄰接矩陣實現

在有向圖或無相同中求全源最短路徑 #include<bits/stdc++.h> using namespace std; const int INF=100000000; const int maxv=200;//根據需要改 int n,m; int dis[maxv][maxv];//記錄數組 void Floyed() { for(int k=0;k<n;k++) for(int
相關文章
相關標籤/搜索