">#include<queue> using namespace std; #define x first #define y second int n, m; const int N = 1010; char s[N][N]; bool t[N][N]; int ans; typedef pair<int, int> PLL; int dx[] = {1, -1, 0, 0, 1, -1,-1, 1}, dy[] = {0, 0, 1, -1, 1 , -1, 1, -1}; int bfs(PLL st) { for(int i = 0; i < ...