Runtime Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:9:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    9 |         gets(a+1);
      |         ~~~~^~~~~
In file included from /usr/include/c++/12/cstdio:42,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:46,
                 from /in/foo.cc:1:
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/usr/bin/ld: /tmp/ccvu9wb5.o: in function `main':
foo.cc:(.text.startup+0x40): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 2ms 492.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 340.0 KiB
#4 Accepted 1ms 376.0 KiB
#5 Accepted 1ms 532.0 KiB
#6 Accepted 1ms 396.0 KiB
#7 Accepted 1ms 352.0 KiB
#8 Accepted 1ms 480.0 KiB
#9 Runtime Error 1ms 532.0 KiB
#10 Accepted 1ms 532.0 KiB

信息

递交者
类型
递交
题目
P3129 字符转换GESP202603三级T2
语言
C++
递交时间
2026-07-12 12:29:03
评测时间
2026-07-12 12:29:03
评测机
分数
90
总耗时
17ms
峰值内存
532.0 KiB