/ Vijos /

记录详情

Runtime Error

/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
    6 |         scanf("%d %d %d %d",&l,&s,&t,&m);
      |                ~^           ~~
      |                 |           |
      |                 int *       long int *
      |                %ld
/in/foo.c:6:20: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'long int *' [-Wformat=]
    6 |         scanf("%d %d %d %d",&l,&s,&t,&m);
      |                   ~^           ~~
      |                    |           |
      |                    int *       long int *
      |                   %ld
/in/foo.c:6:23: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'long int *' [-Wformat=]
    6 |         scanf("%d %d %d %d",&l,&s,&t,&m);
      |                      ~^           ~~
      |                       |           |
      |                       int *       long int *
      |                      %ld
/in/foo.c:6:26: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'long int *' [-Wformat=]
    6 |         scanf("%d %d %d %d",&l,&s,&t,&m);
      |                         ~^           ~~
      |                          |           |
      |                          int *       long int *
      |                         %ld
/in/foo.c:8:43: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
    8 |         for (i = 0; i < m-1; i++) scanf("%d ",&a[i]);
      |                                          ~^   ~~~~~
      |                                           |   |
      |                                           |   long int *
      |                                           int *
      |                                          %ld
/in/foo.c:9:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
    9 |         scanf("%d",&a[m-1]);
      |                ~^  ~~~~~~~
      |                 |  |
      |                 |  long int *
      |                 int *
      |                %ld
/in/foo.c:17:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
   17 |                 printf("%d", ans);
      |                         ~^   ~~~
      |                          |   |
      |                          int long int
      |                         %ld
/in/foo.c:18:17: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   18 |                 exit(0);
      |                 ^~~~
/in/foo.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
/in/foo.c:18:17: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   18 |                 exit(0);
      |                 ^~~~
/in/foo.c:18:17: note: include '<stdlib.h>' or provide a declaration of 'exit'
/in/foo.c:66:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
   66 |         printf("%d", ans);
      |                 ~^   ~~~
      |                  |   |
      |                  int long int
      |                 %ld
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 284.0 KiB
#2 Wrong Answer 1ms 320.0 KiB
#3 Wrong Answer 1ms 284.0 KiB
#4 Runtime Error 1ms 456.0 KiB
#5 Runtime Error 1ms 444.0 KiB
#6 Accepted 1ms 320.0 KiB
#7 Wrong Answer 1ms 324.0 KiB
#8 Runtime Error 1ms 444.0 KiB
#9 Runtime Error 1ms 448.0 KiB
#10 Wrong Answer 1ms 344.0 KiB

信息

递交者
类型
递交
题目
P1002 过河
语言
C
递交时间
2025-05-29 23:55:47
评测时间
2025-05-29 23:55:47
评测机
分数
10
总耗时
14ms
峰值内存
456.0 KiB