/ 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/ccsCIH1I.o: in function `Init()':
foo.cc:(.text+0x19): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 172ms 28.102 MiB
#2 Accepted 1298ms 199.324 MiB
#3 Accepted 1323ms 199.312 MiB
#4 Accepted 1382ms 192.328 MiB
#5 Accepted 1325ms 192.328 MiB
#6 Accepted 141ms 28.098 MiB
#7 Accepted 145ms 28.098 MiB
#8 Accepted 1214ms 199.32 MiB
#9 Accepted 1216ms 199.328 MiB
#10 Accepted 1233ms 199.328 MiB

信息

递交者
类型
递交
题目
P2020 小Q的苹果树
语言
C++
递交时间
2025-10-04 15:37:39
评测时间
2025-10-04 15:37:39
评测机
分数
100
总耗时
9453ms
峰值内存
199.328 MiB