#include<cstdio> #include<cstring> #include<iostream> #include<cmath> #include<vector> #include<queue> using namespace std; const int MAXN=1001; const int INF=0x3f3f3f3f; struct node { int to,w; &nbs...