链式前向星存图
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++;
}
本文来自博客园,作者:seonwee,转载请注明原文链接:https://www.cnblogs.com/seonwee/p/15170847.html

浙公网安备 33010602011771号