foo.cc:11:1: error: expected initializer before 'int'
11 | int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
| ^~~
foo.cc:11:40: error: expected unqualified-id before ',' token
11 | int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
| ^
foo.cc:11:48: error: expected constructor, destructor, or type conversion before '=' token
11 | int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
| ^
foo.cc: In function 'void bfs()':
foo.cc:27:32: error: 'dx' was not declared in this scope; did you mean 'nx'?
27 | int nx = t.first + dx[i];
| ^~
| nx
foo.cc:28:33: error: 'dy' was not declared in this scope; did you mean 'ny'?
28 | int ny = t.second + dy[i];
| ^~
| ny
foo.cc:35:62: error: 'maze' was not declared in this scope
35 | if(nx < 0 || nx >= n || ny < 0 || ny >= m || maze[nx][ny] == 'X') break;//这里说明受阻了,飞镖停下来
| ^~~~
foo.cc:45:32: error: 'dx' was not declared in this scope; did you mean 'nx'?
45 | int nx = t.first + dx[i];
| ^~
| nx
foo.cc:46:33: error: 'dy' was not declared in this scope; did you mean 'ny'?
46 | int ny = t.second + dy[i];
| ^~
| ny
foo.cc:47:58: error: 'maze' was not declared in this scope
47 | if(nx >= 0 && nx < n && ny >= 0 && ny < m && maze[nx][ny] != 'X' && !vis[nx][ny]){
| ^~~~
foo.cc: In function 'int main()':
foo.cc:63:16: error: 'maze' was not declared in this scope
63 | cin >> maze[i];
| ^~~~
[Hydro](https://hydro.ac)提供评测服务