int head[N]; struct edge { int to,nxt; } e[N]; ... void add(int x,int y) { e[tot].to=y; e[tot].nxt=head[x]; head[x]=tot; } ...
我这个是链式前向星还是邻接表?