提交记录 #400

提交时间:2024-12-03 16:30:25
语言:c 状态:Unaccepted
编译情况:编译成功
code.c: In function ‘replace’:
code.c:10:15: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
   10 |     char *k = malloc(a + 1); // 分配足够的空间以存储结果字符串
      |               ^~~~~~
code.c:10:15: warning: incompatible implicit declaration of built-in function ‘malloc’
code.c:4:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
    3 | #include <string.h>
  +++ |+#include <stdlib.h>
    4 | 
code.c:36:5: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
   36 |     free(k); // 释放k分配的内存
      |     ^~~~
code.c:36:5: warning: incompatible implicit declaration of built-in function ‘free’
code.c:36:5: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
code.c:8:9: warning: unused variable ‘c’ [-Wunused-variable]
    8 |     int c = strlen(str);
      |         ^
固定测试点#1:
waWrong Answer
time 0.001s
memory 232 kB
固定测试点#2:
reRuntime Error: malloc(): corrupted top size - Returning:-6
time 0.001s
memory 496 kB
固定测试点#3:
reRuntime Error: malloc(): corrupted top size - Returning:-6
time 0.000s
memory 228 kB
附加测试点暂不可用
... 不可用
time N/A
memory N/A
京ICP备2024093084 号