记录详情

Runtime Error

foo.c: In function 'evaluateExpression':
foo.c:63:43: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   63 |             char* subExpression = (char*) malloc((j - i - 1) * sizeof(char));
      |                                           ^~~~~~
foo.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    3 | #include <string.h>
  +++ |+#include <stdlib.h>
    4 | 
foo.c:63:43: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   63 |             char* subExpression = (char*) malloc((j - i - 1) * sizeof(char));
      |                                           ^~~~~~
foo.c:63:43: note: include '<stdlib.h>' or provide a declaration of 'malloc'
foo.c:68:13: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   68 |             free(subExpression);
      |             ^~~~
foo.c:68:13: note: include '<stdlib.h>' or provide a declaration of 'free'
foo.c:68:13: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
foo.c:68:13: note: include '<stdlib.h>' or provide a declaration of 'free'
foo.c: In function 'main':
foo.c:101:24: warning: format '%d' expects argument of type 'int *', but argument 3 has type '_Bool *' [-Wformat=]
  101 |             scanf(" %c%d", &variables[i].key, &variables[i].value);
      |                       ~^                      ~~~~~~~~~~~~~~~~~~~
      |                        |                      |
      |                        int *                  _Bool *
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 2ms 332.0 KiB
#2 Runtime Error Segmentation fault 2ms 284.0 KiB
#3 Runtime Error Segmentation fault 2ms 284.0 KiB
#4 Runtime Error Segmentation fault 2ms 284.0 KiB
#5 Runtime Error Segmentation fault 2ms 284.0 KiB
#6 Runtime Error Segmentation fault 1ms 284.0 KiB
#7 Runtime Error Segmentation fault 2ms 284.0 KiB
#8 Runtime Error Segmentation fault 2ms 284.0 KiB
#9 Runtime Error Segmentation fault 2ms 284.0 KiB
#10 Runtime Error Segmentation fault 2ms 284.0 KiB

信息

递交者
类型
递交
题目
P1560 Problem 8E. 逻辑表达式
比赛
2023秋 悬赏令第八周
语言
C
递交时间
2023-11-28 13:20:30
评测时间
2023-11-28 13:20:30
评测机
分数
0
总耗时
24ms
峰值内存
332.0 KiB