/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'void init()':
/in/foo.cc:38:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   38 |         gets(a);        gets(c);
      |         ~~~~^~~
In file included from /usr/include/c++/12/cstdio:42,
                 from /usr/include/c++/12/ext/string_conversions.h:43,
                 from /usr/include/c++/12/bits/basic_string.h:3960,
                 from /usr/include/c++/12/string:53,
                 from /usr/include/c++/12/bits/locale_classes.h:40,
                 from /usr/include/c++/12/bits/ios_base.h:41,
                 from /usr/include/c++/12/ios:42,
                 from /usr/include/c++/12/ostream:38,
                 from /usr/include/c++/12/iostream:39,
                 from /in/foo.cc:17:
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/in/foo.cc:38:29: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   38 |         gets(a);        gets(c);
      |                         ~~~~^~~
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/usr/bin/ld: /tmp/ccR8TFBQ.o: in function `init()':
foo.cc:(.text+0x58): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Runtime Error 3ms 540.0 KiB
#2 Accepted 2ms 528.0 KiB
#3 Runtime Error 3ms 536.0 KiB
#4 Accepted 2ms 480.0 KiB
#5 Runtime Error 3ms 548.0 KiB
#6 Runtime Error 4ms 624.0 KiB
#7 Accepted 4ms 636.0 KiB
#8 Accepted 12ms 1.477 MiB
#9 Accepted 11ms 1.477 MiB
#10 Accepted 11ms 1.465 MiB

信息

递交者
类型
递交
题目
P1761 统计单词数
语言
C++
递交时间
2026-10-30 15:16:05
评测时间
2026-10-30 15:16:05
评测机
分数
60
总耗时
60ms
峰值内存
1.477 MiB