poj2386 深搜 连通块问题

#include 
#include 
#define maxn 101

char pool[maxn][maxn];
int vis[maxn][maxn];
int n, m;
int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1}, dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
void dfs(int x, int y){
	int d;
	vis[x][y] = 1;
	for(d = 0; d < 8; ++d){
		int nx = x + dx[d], ny = y + dy[d];
		if(nx>=0 && nx=0 && ny

你可能感兴趣的:(其他)