/ Vijos /

记录详情

Runtime Error

foo.c: In function ‘main’:
foo.c:8:25: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=]
    8 |                 scanf("%d%s",a[i++],c);
      |                        ~^    ~~~~~~
      |                         |     |
      |                         int * int
foo.c:8:27: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=]
    8 |                 scanf("%d%s",a[i++],c);
      |                          ~^         ~
      |                           |         |
      |                           char *    int
foo.c:9:26: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
    9 |                 printf("%d%s",&a[i++],&c);
      |                         ~^    ~~~~~~~
      |                          |    |
      |                          int  int *
      |                         %ls
foo.c:10:17: warning: comparison between pointer and integer
   10 |         }while(c!="\0");
      |                 ^~
foo.c:10:17: warning: comparison with string literal results in unspecified behavior [-Waddress]
foo.c:8:17: warning: ‘c’ is used uninitialized [-Wuninitialized]
    8 |                 scanf("%d%s",a[i++],c);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
foo.c:5:14: note: ‘c’ declared here
    5 |         char c;
      |              ^
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 1ms 256.0 KiB

信息

递交者
类型
自测
题目
P1303 导弹拦截
语言
C
递交时间
2026-10-01 06:56:32
评测时间
2026-10-14 04:33:04
评测机
分数
0
总耗时
1ms
峰值内存
256.0 KiB