http://acm.hdu.edu.cn/showproblem.php?pid=1010
#include <iostream>
#include <cmath>
using namespace std;
char M[8][8];
int dir[4][2] = {{0, -1},{0, 1},{-1, 0},{1, 0}};
int di, dj;//终点
int n, m, time, wall;
bool isfind;
void search(int x, int y, int _t)
{
int i;
if (x < 0 || y < 0 || x > n || y > m)
return ;
if (x == di && y == dj && _t == time) {
isfind = true;
return ;
}
if ( (abs(x-di)+abs(y-dj))%2 != (time-_t)%2 ) {
return ;
}
......
阅读全文