记录详情

Compile Error

foo.cc: In function 'int f(int, int, int (*)[505])':
foo.cc:16:36: error: expected primary-expression before ')' token
   16 |    if(a[i+1][j]<=a[i][j]&&flag==0&&)cnt++;flag=1;
      |                                    ^
foo.cc:16:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   16 |    if(a[i+1][j]<=a[i][j]&&flag==0&&)cnt++;flag=1;
      |    ^~
foo.cc:16:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   16 |    if(a[i+1][j]<=a[i][j]&&flag==0&&)cnt++;flag=1;
      |                                           ^~~~
foo.cc:17:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   17 |    if(a[i][j+1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:17:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   17 |    if(a[i][j+1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                         ^~~~
foo.cc:18:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   18 |    if(a[i-1][j]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:18:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   18 |    if(a[i-1][j]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                         ^~~~
foo.cc:19:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   19 |    if(a[i][j-1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:19:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   19 |    if(a[i][j-1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                         ^~~~
foo.cc:20:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   20 |    if(a[i+1][j+1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:20:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   20 |    if(a[i+1][j+1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                           ^~~~
foo.cc:21:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   21 |    if(a[i-1][j-1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:21:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   21 |    if(a[i-1][j-1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                           ^~~~
foo.cc:22:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   22 |    if(a[i+1][j-1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:22:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   22 |    if(a[i+1][j-1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                           ^~~~
foo.cc:23:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   23 |    if(a[i-1][j+1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |    ^~
foo.cc:23:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   23 |    if(a[i-1][j+1]<=a[i][j]&&flag==0)cnt++;flag=1;
      |                                           ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
4-4 有多少个山峰
比赛
2022暑期青少年社团(训练赛)
语言
C++
递交时间
2022-08-07 20:06:11
评测时间
2022-08-07 20:06:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes