#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int n ,m ;
char s[55][55] ;
int vis[55][55] ;
int X[4] = {0,0,1,-1} ;
int Y[4] = {1,-1,0,0} ;
int cango(int x, int y)
{
if(x >= 0 && x < n && y >= 0 && y < m && s[x][y] == 'B')
return 1 ;
return 0 ;
}
void dfs(int x , int y , int cnt , int ben) // cnt是标志变量,具体应用如下,ben 是为了记录上一......
阅读全文