1 #include <iostream> 2 #include <string> 3 #include <iomanip> 4 using namespace std; 5 6 void dijsktra(int n, int **arc); 7 8 int main(){ 9 int n;//节点数 10 int m;//边数 11 int a, b, c; 12 int **arc;//邻接矩阵 13 cout << "输入图的节点个数和边的条数:" << endl; 14 cin >> n >> m; 15 //初始化邻接矩阵 16 arc = new int*[n]; 17 for (int i = 0; i < n; i++){ 18 arc[i] = new int[n]; 19 for (int j = 0; j < n; j++){ 20