记录详情

Wrong Answer

foo.c: In function 'main':
foo.c:37:30: warning: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   37 |         int length1 = strlen(a);
      |                              ^
      |                              |
      |                              int *
In file included from foo.c:2:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
foo.c:38:30: warning: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   38 |         int length2 = strlen(b);
      |                              ^
      |                              |
      |                              int *
In file included from foo.c:2:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
foo.c:37:23: warning: 'a' is used uninitialized [-Wuninitialized]
   37 |         int length1 = strlen(a);
      |                       ^~~~~~~~~
In file included from foo.c:2:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/string.h:407:15: note: by argument 1 of type 'const char *' to 'strlen' declared here
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
foo.c:27:13: note: 'a' declared here
   27 |         int a[10000];
      |             ^
foo.c:38:23: warning: 'b' is used uninitialized [-Wuninitialized]
   38 |         int length2 = strlen(b);
      |                       ^~~~~~~~~
In file included from foo.c:2:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/string.h:407:15: note: by argument 1 of type 'const char *' to 'strlen' declared here
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
foo.c:28:13: note: 'b' declared here
   28 |         int b[10000];
      |             ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 0, expect 3. 2ms 384.0 KiB
#2 Wrong Answer Read 0, expect 7. 2ms 256.0 KiB
#3 Wrong Answer Read 0, expect 12. 2ms 256.0 KiB
#4 Wrong Answer Read 0, expect 12. 2ms 256.0 KiB
#5 Wrong Answer Read 0, expect 1. 2ms 256.0 KiB

信息

递交者
类型
递交
语言
C
递交时间
2022-10-08 08:02:29
评测时间
2022-10-08 08:02:29
评测机
分数
0
总耗时
13ms
峰值内存
384.0 KiB