/ Vijos /

记录详情

Compile Error

foo.cc:4:1: error: 'di' does not name a type
    4 | di[4]={0,0,1,-1},dj[4]={1,-1,0,0}
      | ^~
foo.cc:4:17: error: expected unqualified-id before ',' token
    4 | di[4]={0,0,1,-1},dj[4]={1,-1,0,0}
      |                 ^
foo.cc:4:23: error: expected constructor, destructor, or type conversion before '=' token
    4 | di[4]={0,0,1,-1},dj[4]={1,-1,0,0}
      |                       ^
foo.cc: In function 'void dfs(int, int)':
foo.cc:15:22: error: 'di' was not declared in this scope; did you mean 'i'?
   15 |                 if(i+di[o]>=1&&i+di[o]<=n&&j+dj[o]>=1&&j+dj[o]<=m&&a[i][j]>a[i+di[o]][j+dj[o]])
      |                      ^~
      |                      i
foo.cc:15:46: error: 'dj' was not declared in this scope; did you mean 'j'?
   15 |                 if(i+di[o]>=1&&i+di[o]<=n&&j+dj[o]>=1&&j+dj[o]<=m&&a[i][j]>a[i+di[o]][j+dj[o]])
      |                                              ^~
      |                                              j
foo.cc:16:45: error: 'k' was not declared in this scope
   16 |                         dfs(i+di[o],j+dj[o],k);
      |                                             ^
foo.cc: In function 'void dfs(int, int, int)':
foo.cc:23:22: error: 'di' was not declared in this scope; did you mean 'i'?
   23 |                 if(i+di[o]>=1&&i+di[o]<=n&&j+dj[o]>=1&&j+dj[o]<=m&&a[i][j]>a[i+di[o]][j+dj[o]])
      |                      ^~
      |                      i
foo.cc:23:46: error: 'dj' was not declared in this scope; did you mean 'j'?
   23 |                 if(i+di[o]>=1&&i+di[o]<=n&&j+dj[o]>=1&&j+dj[o]<=m&&a[i][j]>a[i+di[o]][j+dj[o]])
      |                                              ^~
      |                                              j
foo.cc: In function 'int main()':
foo.cc:36:17: error: 'dfs1' was not declared in this scope; did you mean 'dfs'?
   36 |                 dfs1(1,i,i);
      |                 ^~~~
      |                 dfs
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1777 引水入城
语言
C++
递交时间
2023-05-10 17:06:02
评测时间
2023-05-10 17:06:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes