记录详情

Runtime Error

foo.c: In function 'FindMax':
foo.c:4:13: warning: unused variable 't' [-Wunused-variable]
    4 |   int i,j,k,t,q;
      |             ^
foo.c: In function 'main':
foo.c:21:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   21 |  for(i=0;i<n2;i++)
      |  ^~~
foo.c:24:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   24 |   for(i=0;i<n1;i++)
      |   ^~~
foo.c:18:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   18 |  scanf("%d%d",&n1,&n2);
      |  ^~~~~~~~~~~~~~~~~~~~~
foo.c:20:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   20 |   scanf("%d",&a[i]);
      |   ^~~~~~~~~~~~~~~~~
foo.c:22:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   22 |   scanf("%d",&b[i]);
      |   ^~~~~~~~~~~~~~~~~
foo.c: In function 'FindMax':
foo.c:13:10: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized]
   13 |  }return q;
      |          ^
foo.c: In function 'main':
foo.c:29:7: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized]
   29 |   { if(i==FindMax(a,n2)) break;
      |       ^
foo.c:25:7: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized]
   25 |   { if(i==FindMax(a,n1)) break;
      |       ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Standard answer longer than user output. 3ms 256.0 KiB
#2 Runtime Error Aborted 3ms 256.0 KiB
#3 Runtime Error Aborted 3ms 384.0 KiB
#4 Runtime Error Aborted 3ms 384.0 KiB
#5 Wrong Answer Standard answer longer than user output. 2ms 256.0 KiB

信息

递交者
类型
递交
题目
A10-3 数组的去重
比赛
中北 计算机2021级专业修读指导(4)
语言
C
递交时间
2021-12-23 23:08:53
评测时间
2021-12-23 23:08:53
评测机
分数
0
总耗时
16ms
峰值内存
384.0 KiB