宽搜模板
$BFS$
int BFS() {
//void BFS()
int quex[N * N], quey[N * N], que[N][N], front = 0, rear = 1;
memset(quex, 0, sizeof quex);
memset(quey, 0, sizeof quey);
memset(que, 0, sizeof que);
while (front < rear) {
移动方式;
quex[rear] = quex[front] ;
quey[rear] = quey[front] ;
判断条件
que[quex[rear]][quey[rear]] = que[quex[front]][quey[front]], rear++;
front++;
}
return ;
}