1 //共T条路,求从S到E经过N条路径的最短路径 2 #include3 #include 4 #include 5 #include 6 using namespace std; 7 8 #define CIR(n, m) for (int i=0; i >= 1;48 }49 return ans[f[S]][f[E]];50 }51 52 int main()53 {54 int i,j,k;55 int length, from, to;56 cin>>N>>T>>S>>E;57 for (i=0; i >length>>from>>to;60 if (!f[from]) f[from]=++top;61 if (!f[to]) f[to]=++top;62 map[f[from]][f[to]] = map[f[to]][f[from]] = length;63 } 64 cout< <