标签:
struct Node { int from,to,next; }edge[MAXM]; int tol; int head[MAXN]; void init() { tol=0; memset(head,-1,sizeof(head)); } void addedge(int u,int v) { edge[tol].from=u; edge[tol].to=v; edge[tol].next=head[u]; head[u]=tol++; } for(int i=head[u];i!=-1;i=edge[i].next) { }
标签:
原文地址:http://www.cnblogs.com/lthb/p/4409554.html