检查自己的cnt是不是从1开始的
int cnt=1; void addE(int u,int v,int cost) { cnt++; to[cnt]=v; cf[cnt]=cost; nxt[cnt]=head[u]; head[u]=cnt; }