foo.cc:12:1: error: expected initializer before 'int'
12 | int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};//八个方向,从左往右分别是上 下 左 右 左上 右上 右下 左下,拿相同下标的dx dy搭配可以让当前坐标往特
| ^~~
foo.cc:12:40: error: expected unqualified-id before ',' token
12 | int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};//八个方向,从左往右分别是上 下 左 右 左上 右上 右下 左下,拿相同下标的dx dy搭配可以让当前坐标往特
| ^
foo.cc:12:48: error: expected constructor, destructor, or type conversion before '=' token
12 | int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};//八个方向,从左往右分别是上 下 左 右 左上 右上 右下 左下,拿相同下标的dx dy搭配可以让当前坐标往特
| ^
foo.cc: In function 'void bfs()':
foo.cc:28:23: error: 'dx' was not declared in this scope; did you mean 'nx'?
28 | int nx = t.first + dx[i];
| ^~
| nx
foo.cc:29:24: error: 'dy' was not declared in this scope; did you mean 'ny'?
29 | int ny = t.second + dy[i];
| ^~
| ny
foo.cc:36:50: error: 'maze' was not declared in this scope
36 | if(nx < 0 || nx >= n || ny < 0 || ny >= m || maze[nx][ny] == 'X') break;//这里说明受阻了,飞镖停下来
| ^~~~
foo.cc:46:23: error: 'dx' was not declared in this scope; did you mean 'nx'?
46 | int nx = t.first + dx[i];
| ^~
| nx
foo.cc:47:24: error: 'dy' was not declared in this scope; did you mean 'ny'?
47 | int ny = t.second + dy[i];
| ^~
| ny
foo.cc:48:49: error: 'maze' was not declared in this scope
48 | if(nx >= 0 && nx < n && ny >= 0 && ny < m && maze[nx][ny] != 'X' && !vis[nx][ny]){
| ^~~~
foo.cc: In function 'int main()':
foo.cc:64:10: error: 'maze' was not declared in this scope
64 | cin >> maze[i];
| ^~~~
[Hydro](https://hydro.ac)提供评测服务