【算法題】多源點最短路徑問題(動態規劃)

時間複雜度:O(n³)ios #include <iostream> #define INF 999 using namespace std; const int n=3; // 假設圖中最多頂點個數 int arc[n][n] = {{0,4,11},{6,0,2},{3,INF,0}}; int dist[n][n] = {0}; void Floyd(int arc[n][n],int
相關文章
相關標籤/搜索