typedef struct item{
int to;
int next;
int w;
}Item;
Item E[MAXN];
void addEdge(int u,int v,int w){
E[cnt].to = v;
E[cnt].w = w;
E[cnt].next = head[u];
head[u] = cnt++;
}
原文:https://www.cnblogs.com/daweiguo/p/15170847.html