DFS ">#include<cstring> using namespace std; typedef pair<int, int> PII; char s[30][30]; bool t[30][30]; int n, m; int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1}; int dfs(PII st) { t[st.first][st.second] = true; int ans = 1; for (int i = 0; i < 4; i ++) { int x = dx[i] + st.fir...