记录详情

Runtime Error

foo.c: In function 'main':
foo.c:9:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
  scanf("%d", a[10000]);
         ~^   ~~~~~~~~
foo.c:11:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for (int i = 0; i < n && a[i]<k; i++);
  ^~~
foo.c:12:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  {
  ^
foo.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ^~~~~~~~~~~~~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", a[10000]);
  ^~~~~~~~~~~~~~~~~~~~~
foo.c:10:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&k);
  ^~~~~~~~~~~~~~
foo.c:9:2: warning: array subscript is above array bounds [-Warray-bounds]
  scanf("%d", a[10000]);
  ^~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 0ms 256.0 KiB
#2 Runtime Error Segmentation fault 0ms 256.0 KiB
#3 Runtime Error Segmentation fault 0ms 256.0 KiB
#4 Runtime Error Segmentation fault 0ms 256.0 KiB
#5 Runtime Error Segmentation fault 0ms 256.0 KiB

信息

递交者
类型
递交
比赛
2021(四) 作业第二场:见面赛
语言
C
递交时间
2021-10-31 12:28:38
评测时间
2021-10-31 12:28:38
评测机
分数
0
总耗时
3ms
峰值内存
256.0 KiB