#include <stdio.h> #include <limits.h> #define N 5000 int main() { int n, m; scanf("%d %d", &n, &m); int vcost[N][N]; int distance[N]; int vstate[N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { vcost[i][j...