Dijkstra最短路徑算法鄰接矩陣版

模板參考Kuangbinc++ 數據結構方面:算法 #include<bits/stdc++.h> using namespace std; const int maxn=1010; const int INF=0x3f3f3f3f; bool vis[maxn]; int pre[maxn];//記錄beg到i路徑上的父結點 pre[beg]=-1; int cost[maxn][maxn];/
相關文章
相關標籤/搜索