Compile Error

foo.cc: In function 'int main()':
foo.cc:16:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                         if(a[j]<a);
      |                            ~~~~^~
foo.cc:16:25: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   16 |                         if(a[j]<a);
      |                         ^~
foo.cc:17:33: 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)提供评测服务

信息

递交者
类型
递交
题目
P1191 交换位置
语言
C++
递交时间
2023-11-19 18:53:50
评测时间
2023-11-19 18:53:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes