#include <algorithm> using namespace std; const int N = 510; int g[N][N], dist[N]; int n, m; bool st[N]; int dijkstra() { dist[1] = 0; for(int i = 0; i < n; i++) { int t = -1; //找到未标记节点中dist最小的 for(int j = 1; j <= n; j++) if(!st[j]...