http://acm.hdu.edu.cn/showproblem.php?pid=1252
#include<iostream>
#include<cstdio>
#include<queue>
#include<cstring>
using namespace std;
/*
easy bfs
*/
struct node
{
int x[3];
}p;
int maze[55][55],m,vis[55][55][55];
void set(node t,node tt)
{
vis[t.x[0]][t.x[1]][t.x[2]]=1+vis[tt.x[0]][tt.x[1]][tt.x[2]];
}
int test(node t)
{
return vis[t.x[0]][t.x[1]][t.x[2]];
}
bool ok(node t)
{
return t.x[0]==t.x[1]&&t.x[1]==t.x[2];
}
int bfs()
{
memset(vis,0,sizeof(vis));
node t;
queue<node> que;
if(ok(p))
return 0;
que.push(p);