记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:22:13: error: two consecutive '[' shall only introduce an attribute before '[' token
   22 |      if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k+1][[t+1])
      |             ^
foo.cc:22:13: error: expected ')' before '[' token
   22 |      if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k+1][[t+1])
      |        ~    ^
      |             )
foo.cc:30:14: error: two consecutive '[' shall only introduce an attribute before '[' token
   30 |       if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t-1])
      |              ^
foo.cc:30:14: error: expected ')' before '[' token
   30 |       if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t-1])
      |         ~    ^
      |              )
foo.cc:33:14: error: two consecutive '[' shall only introduce an attribute before '[' token
   33 |       if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t+] && a[k][[t]>a[k+1][[t-1])
      |              ^
foo.cc:33:14: error: expected ')' before '[' token
   33 |       if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t+] && a[k][[t]>a[k+1][[t-1])
      |         ~    ^
      |              )
foo.cc:29:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   29 |      if(t==n-1)
      |        ^
foo.cc:41:14: error: two consecutive '[' shall only introduce an attribute before '[' token
   41 |       if(a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k-1][[t+1])
      |              ^
foo.cc:41:14: error: expected ')' before '[' token
   41 |       if(a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k-1][[t+1])
      |         ~    ^
      |              )
foo.cc:45:15: error: two consecutive '[' shall only introduce an attribute before '[' token
   45 |        if(a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k-1][[t-1])
      |               ^
foo.cc:45:15: error: expected ')' before '[' token
   45 |        if(a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k-1][[t-1])
      |          ~    ^
      |               )
foo.cc:48:15: error: two consecutive '[' shall only introduce an attribute before '[' token
   48 |        if(a[k][[t]>a[k][[t-1] && a[k][[t]>a[k-1][[t-1] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k-1][[t+1])
      |               ^
foo.cc:48:15: error: expected ')' before '[' token
   48 |        if(a[k][[t]>a[k][[t-1] && a[k][[t]>a[k-1][[t-1] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k-1][[t+1])
      |          ~    ^
      |               )
foo.cc:52:14: error: two consecutive '[' shall only introduce an attribute before '[' token
   52 |       if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t-1] && a[k][[t]>a[k-1][[t-1])
      |              ^
foo.cc:52:14: error: expected ')' before '[' token
   52 |       if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t-1] && a[k][[t]>a[k-1][[t-1])
      |         ~    ^
      |              )
foo.cc:56:15: error: two consecutive '[' shall only introduce an attribute before '[' token
   56 |        if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k+1][[t+1] && a[k][[t]>a[k-1][[t+1])
      |               ^
foo.cc:56:15: error: expected ')' before '[' token
   56 |        if(a[k][[t]>a[k+1][[t] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t+1] && a[k][[t]>a[k+1][[t+1] && a[k][[t]>a[k-1][[t+1])
      |          ~    ^
      |               )
foo.cc:59:15: error: two consecutive '[' shall only introduce an attribute before '[' token
   59 |        if(a[k][[t]>a[k][[t+1] && a[k][[t]>a[k+1][[t+1] && a[k][[t]>a[k-1][[t+1] && a[k][[t]>a[k+1][[t] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t-1] && a[k][[t]>a[k-1][[t-1])
      |               ^
foo.cc:59:15: error: expected ')' before '[' token
   59 |        if(a[k][[t]>a[k][[t+1] && a[k][[t]>a[k+1][[t+1] && a[k][[t]>a[k-1][[t+1] && a[k][[t]>a[k+1][[t] && a[k][[t]>a[k-1][[t] && a[k][[t]>a[k][[t-1] && a[k][[t]>a[k+1][[t-1] && a[k][[t]>a[k-1][[t-1])
      |          ~    ^
      |               )
foo.cc:55:9: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   55 |       if(t==0)//左边缘
      |         ^
foo.cc:51:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   51 |      if(t==n-1)//右边缘
      |        ^
foo.cc:44:9: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   44 |       if(t==n-1)
      |         ^
foo.cc:40:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   40 |      if(t==0)
      |        ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2022暑期青少年社团(训练赛)
语言
C++
递交时间
2022-08-07 21:39:50
评测时间
2022-08-07 21:39:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes