/ Vijos /

记录详情

Compile Error

/in/foo.cc:17:1: error: expected initializer before 'int'
 int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
 ^~~
/in/foo.cc:17:40: error: expected unqualified-id before ',' token
 int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
                                        ^
/in/foo.cc:17:48: error: expected constructor, destructor, or type conversion before '=' token
 int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
                                                ^
/in/foo.cc: In function 'void bfs()':
/in/foo.cc:33:32: error: 'dx' was not declared in this scope
             int nx = t.first + dx[i];
                                ^~
/in/foo.cc:34:33: error: 'dy' was not declared in this scope
             int ny = t.second + dy[i];
                                 ^~
/in/foo.cc:41:62: error: 'maze' was not declared in this scope
                 if(nx < 0 || nx >= n || ny < 0 || ny >= m || maze[nx][ny] == 'X') break;//这里说明受阻了,飞镖停下来
                                                              ^~~~
/in/foo.cc:51:32: error: 'dx' was not declared in this scope
             int nx = t.first + dx[i];
                                ^~
/in/foo.cc:52:33: error: 'dy' was not declared in this scope
             int ny = t.second + dy[i];
                                 ^~
/in/foo.cc:53:58: error: 'maze' was not declared in this scope
             if(nx >= 0 && nx < n && ny >= 0 && ny < m && maze[nx][ny] != 'X' && !vis[nx][ny]){
                                                          ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:69:16: error: 'maze' was not declared in this scope
         cin >> maze[i];
                ^~~~

信息

递交者
类型
递交
题目
P1263 单挑女飞贼
语言
C++
递交时间
2023-12-11 23:17:36
评测时间
2023-12-11 23:17:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes