foo.cc: In function 'int main()':
foo.cc:16:28: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
16 | if(a[j]<a;
| ^
foo.cc:16:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if(a[j]<a;
| ~~~~^~
foo.cc:16:32: warning: statement has no effect [-Wunused-value]
foo.cc:17:37: error: expected ')' before ';' token
17 | ok=0;cnt++;
| ^
| )
foo.cc:16:27: note: to match this '('
16 | if(a[j]<a;
| ^
foo.cc:17:35: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
17 | ok=0;cnt++;
| ~~^~
foo.cc:16:25: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
16 | if(a[j]<a;
| ^~
foo.cc:17:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
17 | ok=0;cnt++;
| ^~~
foo.cc:19:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
19 | if(ok==1);
| ^~
foo.cc:20:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
20 | {
| ^
foo.cc:5:24: warning: unused variable 'k' [-Wunused-variable]
5 | int n,a[20000],k,cnt;
| ^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务