记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:19:7: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z
    if(s<c[i-1][j-1]+c[i-1][j]+c[i][j-1]+c[i][j]+c[i+1][j]+c[i][j+1]+c[i-1][j+1]+c[i+1][j-1];
       ^
foo.cc:19:8: warning: statement has no effect [-Wunused-value]
    if(s<c[i-1][j-1]+c[i-1][j]+c[i][j-1]+c[i][j]+c[i+1][j]+c[i][j+1]+c[i-1][j+1]+c[i+1][j-1];
       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:20:7: error: expected ')' before ';' token
    m=i;n=j}
       ^
foo.cc:20:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    m=i;n=j}
    ~^~
foo.cc:19:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    if(s<c[i-1][j-1]+c[i-1][j]+c[i][j-1]+c[i][j]+c[i+1][j]+c[i][j+1]+c[i-1][j+1]+c[i+1][j-1];
    ^~
foo.cc:20:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    m=i;n=j}
        ^
foo.cc:20:11: error: expected ';' before '}' token
    m=i;n=j}
           ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
周末测试2
语言
C++
递交时间
2021-09-24 21:28:08
评测时间
2021-09-24 21:28:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes