//建图的方式好像没有别人好,我把墙也算到图里面去了
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int a[102][102],n,m,ans;
int dir[4][2]= {2,0,0,2,-2,0,0,-2};
int t[4][2]= {1,0,0,1,-1,0,0,-1};
void dfs(int x1,int y1)
{
int x,y;
for(int i=0; i<4; ++i)
{
x=x1+dir[i][0],y=y1+dir[i][1];
if(!a[x][y]&&!a[x1+t[i
poj1164(dfs)城堡问题
最新推荐文章于 2019-08-11 15:04:19 发布