void
add(
int
x,
y,
z){
//邻接表
e[tot].
from
=x;//头结点
e[tot].to=y;//尾结点
e[tot].w=z;//边权
e[tot].next=head[x];
head[x]=tot++;
}