个人认为比较标准的邻接矩阵Dij写法,仅供参考#include <bits/stdc++.h> #define INF 0x7fffffff using namespace std; int G[5050][5050]; int dis[5050]; //min dis from s to [] bool vis[5050] = {false}; void dij(int s, int n) { int i = 1, j = 1; fill(dis, dis + 5050, INF); dis[s] = 0; for (i = 1; i...