记录三百六十八 不小心落水了
um;i++){//建立数组
weight[i].resize(vertexnum,intmax);
path[i].resize(vertexnum,-1);
}
}
voidgetData(){//获取数据
ifstreamin("data");
in>>vertexnum>>edgenum;
initialvector();
intfrom,to;
doublew;
while(in>>from>>to>>w){
weight[from][to]=w;
path[from][to]=from;//to的前继是from
weight[from][from]=0;//自身到自身的权重为0
path[from][from]=from;
weight[to][to]=0;
path[to][t