//迪杰斯特拉的模板,增加一个cost数组存cost,有更短距离时强制更新dis和cost,距离相等时判断是否更新cost #include<iostream> #include<vector> #include<queue> using namespace std; struct Edges; struct Edges { int U, V, WEIGHT,COST; Edges(int a, int b, int c,int d) { U = a, V = b, WEIGHT = c, COST = d; } }; struct Nod...