记录详情

Runtime Error

foo.c: In function 'main':
foo.c:10:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
   10 |                 scanf("%d %d", time[i], cnt[i]);
      |                        ~^      ~~~~~~~
      |                         |          |
      |                         int *      int
foo.c:10:28: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=]
   10 |                 scanf("%d %d", time[i], cnt[i]);
      |                           ~^            ~~~~~~
      |                            |               |
      |                            int *           int
foo.c:10:17: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
   10 |                 scanf("%d %d", time[i], cnt[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:7:13: note: 'cnt' declared here
    7 |         int cnt[100];
      |             ^~~
foo.c:10:17: warning: 'time' may be used uninitialized [-Wmaybe-uninitialized]
   10 |                 scanf("%d %d", time[i], cnt[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:6:13: note: 'time' declared here
    6 |         int time[100];
      |             ^~~~
foo.c:25:13: warning: 'sum' may be used uninitialized [-Wmaybe-uninitialized]
   25 |         sum = sum + 20 * error;
      |         ~~~~^~~~~~~~~~~~~~~~~~
foo.c:18:13: note: 'sum' was declared here
   18 |         int sum,m = 0;
      |             ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 2ms 284.0 KiB

信息

递交者
类型
自测
题目
P1481 G. ACM and Penalty
语言
C
递交时间
2023-08-25 13:20:24
评测时间
2023-08-25 13:20:24
评测机
分数
0
总耗时
2ms
峰值内存
284.0 KiB