记录详情

Wrong Answer

foo.c: In function 'main':
foo.c:12:17: warning: array subscript <unknown> is outside array bounds of 'int[<U32d0>]' [-Warray-bounds]
   12 |         a=number[k];
      |           ~~~~~~^~~
foo.c:7:13: note: while referencing 'number.7'
    7 |         int number[n];
      |             ^~~~~~
foo.c:15:15: warning: array subscript 1 is outside array bounds of 'int[<U32d0>]' [-Warray-bounds]
   15 |         number[1]=a;
      |         ~~~~~~^~~
foo.c:7:13: note: while referencing 'number.7'
    7 |         int number[n];
      |             ^~~~~~
foo.c:16:32: warning: array subscript i is outside array bounds of 'int[<U32d0>]' [-Warray-bounds]
   16 |         for(int i=1;i<n+1;i++){printf("%d ",number[i]);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
foo.c:7:13: note: while referencing 'number.7'
    7 |         int number[n];
      |             ^~~~~~
foo.c:13:46: warning: array subscript <unknown> is outside array bounds of 'int[<U32d0>]' [-Warray-bounds]
   13 |         for(int i=k;i>1;i--){number[i]=number[i-1];
      |                                        ~~~~~~^~~~~
foo.c:7:13: note: while referencing 'number.7'
    7 |         int number[n];
      |             ^~~~~~
foo.c:13:36: warning: array subscript i is outside array bounds of 'int[<U32d0>]' [-Warray-bounds]
   13 |         for(int i=k;i>1;i--){number[i]=number[i-1];
      |                              ~~~~~~^~~
foo.c:7:13: note: while referencing 'number.7'
    7 |         int number[n];
      |             ^~~~~~
foo.c:10:32: warning: array subscript i is outside array bounds of 'int[<U32d0>]' [-Warray-bounds]
   10 |         for(int i=1;i<n+1;i++){scanf("%d",&number[i]);
      |                                ^~~~~~~~~~~~~~~~~~~~~~
foo.c:7:13: note: while referencing 'number.7'
    7 |         int number[n];
      |             ^~~~~~
foo.c:13:39: warning: '__builtin_memmove' offset [0, 3] is out of the bounds [0, 0] of object 'number.7' with type 'unsigned char[0]' [-Warray-bounds]
   13 |         for(int i=k;i>1;i--){number[i]=number[i-1];
      |                              ~~~~~~~~~^~~~~~~~~~~~
foo.c:7:13: note: 'number.7' declared here
    7 |         int number[n];
      |             ^~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Standard answer longer than user output. 1ms 284.0 KiB

信息

递交者
类型
自测
题目
2-4 点名上前
语言
C
递交时间
2023-09-09 21:35:38
评测时间
2023-09-09 21:35:38
评测机
分数
0
总耗时
1ms
峰值内存
284.0 KiB