#include<bits/stdc++.h> using namespace std; int n, m; char str[110][110]; int cnt; int dx[] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dy[] = {0, 1, 1, 1, 0, -1, -1, -1}; void dfs(int x, int y) { str[x][y] = '.'; for (int i = 0; i < 8; i++) { int tx = dx[i] + x; int ty = dy[i] + y; if (tx >= 1 ...