摘要:
#include <iostream>#include <cstdio>#include <cstring>#define MAXN 40010using namespace std ;struct Graph{ int vex , next , dis ;};Graph g[MAXN * 2] , Q[400];int first[MAXN] , head[MAXN] , set[MAXN] , away[MAXN] , n , m ;bool visited[MAXN] ;//first[v]用来查找节点所在边,即g[first[v]],同时, g[i] 阅读全文