/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'void Init()':
/in/foo.cc:18:9: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   18 |     gets(buf);
      |     ~~~~^~~~~
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:1:
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/in/foo.cc:22:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   22 |         gets(buf);
      |         ~~~~^~~~~
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:100:19: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  100 |     int Test; gets(buf); sscanf(buf,"%d",&Test);
      |               ~~~~^~~~~
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/usr/bin/ld: /tmp/cc8slfxE.o: in function `Init()':
foo.cc:(.text+0x19): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 138ms 28.102 MiB
#2 Accepted 1145ms 199.32 MiB
#3 Accepted 1151ms 199.324 MiB
#4 Accepted 1115ms 192.328 MiB
#5 Accepted 1116ms 192.332 MiB
#6 Accepted 132ms 28.094 MiB
#7 Accepted 133ms 28.098 MiB
#8 Accepted 1096ms 199.328 MiB
#9 Accepted 1086ms 199.324 MiB
#10 Accepted 1078ms 199.18 MiB

信息

递交者
类型
递交
题目
P2020 小Q的苹果树
语言
C++
递交时间
2026-10-28 21:44:24
评测时间
2026-10-28 21:44:24
评测机
分数
100
总耗时
8195ms
峰值内存
199.328 MiB