链式前向星存图
时间:2021-08-22 09:30:10
收藏:0
阅读:26
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
评论(0)