伪邻接表

struct ty{
    int t,next;
}edge[Max]; 
void insertedge(int x,int y)
{
    edge[++m].t=y;
    edge[m].next=head[x];
    head[x]=m;
}