Runtime Error

foo.cc: In function 'int main()':
foo.cc:8:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    8 |         gets(str);
      |         ~~~~^~~~~
In file included from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/cstdio:42,
                 from stdc++.h:46:
/nix/store/mrgib0s2ayr81xv1q84xsjg8ijybalq3-glibc-2.38-27-dev/include/stdio.h:663:14: note: declared here
  663 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/nix/store/1fn92b0783crypjcxvdv6ycmvi27by0j-binutils-2.40/bin/ld: /tmp/cckgqCzr.o: in function `main':
foo.cc:(.text.startup+0x1c): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Standard answer longer than user output. 4ms 328.0 KiB
#2 Wrong Answer Standard answer longer than user output. 4ms 416.0 KiB
#3 Wrong Answer Standard answer longer than user output. 4ms 412.0 KiB
#4 Runtime Error Segmentation fault 4ms 484.0 KiB
#5 Runtime Error Segmentation fault 4ms 412.0 KiB

信息

递交者
类型
递交
题目
P1077 A8-2 字符串的统计函数
语言
C++
递交时间
2024-01-01 15:23:12
评测时间
2024-01-01 15:23:12
评测机
分数
0
总耗时
22ms
峰值内存
484.0 KiB