切记!数组初始化不能直接memset!直接从0到n进行初始化就行了!
for(int i=0;i<=n;i++) { d[i]=0x3f3f3f; v[i]=0; cnt[i]=0; head[i]=0; }