/ Vijos /

记录详情

Runtime Error

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

信息

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