题目描述 Farmer John has recently purchased a new car online, but in his haste he accidentally clicked the "Submit" button twice when selecting extra features for the car, and as a result the car ended up equipped with two GPS navigation systems! Ev…
严格次短路模板,用两个数组分别维护最短路和次短路,用dijskstra,每次更新的时候先更新最短路再更新次短路 写了spfa版的不知道为啥不对-- #include<iostream> #include<cstdio> #include<queue> using namespace std; const int N=5005,inf=1e9; int n,m,h[N],cnt,d1[N],d2[N]; struct qwe { int ne,to,va; }e[2000…