/* 4 0 2 10 10000 2 0 7 3 10 7 0 6 10000 3 6 0 */ #include #include #include #include #include #include using namespace std; const int maxn = 105; const int inf = 10000; int n; int map[maxn][maxn]; int dis[maxn]; bool vis[maxn]; int pre[maxn]; int u,v; void dijkstra(int s) //s start { for(int i=0;i dis[u] + map[u][i]) { dis[i] = map[u][i] + dis[u]; pre[i] = u; } } int tag = inf; for(int i=0;i