/ OPS /

记录详情

Accepted

/in/foo.cc: In function 'int main()':
/in/foo.cc:14:26: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   14 |     while(flag!=0&&gets(r)){
      |                          ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
                 from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
/in/foo.cc:14:26: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   14 |     while(flag!=0&&gets(r)){
      |                          ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
                 from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
/in/foo.cc:15:16: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   15 |      for(j=0; j<strlen(r); j++)
      |               ~^~~~~~~~~~
/in/foo.cc:5:26: warning: unused variable 'c' [-Wunused-variable]
    5 |     char r[1000],s[1000],c;
      |                          ^
/in/foo.cc:7:9: warning: unused variable 'n' [-Wunused-variable]
    7 |     int n,i,j,t=0;
      |         ^
/in/foo.cc:7:15: warning: unused variable 't' [-Wunused-variable]
    7 |     int n,i,j,t=0;
      |               ^
/usr/bin/ld: /tmp/ccw5NrlI.o: in function `main':
foo.cc:(.text.startup+0x71): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 3ms 656.0 KiB

信息

递交者
类型
递交
比赛
2024_2025(1)C0023实验6+李强老师班级
语言
C++
递交时间
2024-12-06 12:31:08
评测时间
2024-12-06 12:31:08
评测机
分数
10
总耗时
3ms
峰值内存
656.0 KiB