记录详情

Accepted

/in/foo.c: In function 'FindSecondMax':
/in/foo.c:45:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
  else
  ^~~~
/in/foo.c:48:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
   for (j = imax2; j < n; j++)
   ^~~
/in/foo.c:21:30: warning: unused variable 'imax1' [-Wunused-variable]
  int i,j;int max1, max2; int imax1, imax2;int cnt=0;
                              ^~~~~
/in/foo.c: In function 'main':
/in/foo.c:63:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i=0;i<n2;i++)
     ^~~
/in/foo.c:65:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  int amax=FindSecondMax(a,n1);
  ^~~
/in/foo.c: In function 'FindSecondMax':
/in/foo.c:21:37: warning: 'imax2' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int i,j;int max1, max2; int imax1, imax2;int cnt=0;
                                     ^~~~~
# 状态 耗时 内存占用
#1 Accepted 1ms 200.0 KiB

信息

递交者
类型
自测
题目
A9-4 数组中第二大的数
语言
C
递交时间
2023-11-21 14:57:00
评测时间
2023-11-21 14:57:00
评测机
分数
10
总耗时
1ms
峰值内存
200.0 KiB