Wrong Answer

foo.cc: In function 'int main()':
foo.cc:16:25: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   16 |                         if(a[j]<a[j-1])
      |                         ^~
foo.cc:18:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   18 |                                 ok=0;cnt++;
      |                                 ^~
foo.cc:20:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   20 |                 if(ok==1);
      |                 ^~
foo.cc:21:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   21 |                 {
      |                 ^
foo.cc:5:24: warning: unused variable 'k' [-Wunused-variable]
    5 |         int n,a[20000],k,cnt;
      |                        ^
foo.cc:5:26: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
    5 |         int n,a[20000],k,cnt;
      |                          ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 4, expect 3. 4ms 412.0 KiB
#2 Wrong Answer Read 4, expect 2. 4ms 412.0 KiB
#3 Wrong Answer Read 9, expect 0. 4ms 412.0 KiB
#4 Wrong Answer Read 9, expect 5. 3ms 412.0 KiB
#5 Wrong Answer Read 19, expect 10. 3ms 412.0 KiB

信息

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