#include <iostream> #include <vector> #include <queue> #include <cstring> using namespace std; typedef pair<int, int>PII; const int N = 1010, M = 1e5 + 10, INF = 0x3f3f3f3f; int n, m, a, b, d, p, s, t; int dist[N], cost[N]; bool st[N]; struct Edge { int to, lenth, pri...