#include<bits/stdc++.h> using namespace std; const int N = 105; const int INF = 0x3f3f3f3f; int n, m; int vis[N][N]; int dis[N][N]; const int dir[8][2] = {{-2, 1}, {-2, -1}, {-1, -2}, {-1, 2}, {2, -1}, {2, 1}, {1, -2}, {1, 2}}; struct Node { int x, y, step; int g, h, f; inline...