(模板)链式前向星

树下

2018-08-27 15:52:28

Personal

``` int head[]; struct Edge{ int next,to,dis; }edge[]; void add(int from,int to,int dis){ edge[++num].next=head[from]; edge[num].to=to; edge[num].dis=dis; head[from]=num; } ```