/ WHOJ /

记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:58:34: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   58 |  scanf("%d%d",&r,&c); gets(map[0]);//吞掉换行符QwQ
      |                                  ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6496,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:58:34: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   58 |  scanf("%d%d",&r,&c); gets(map[0]);//吞掉换行符QwQ
      |                                  ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6496,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:59:37: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   59 |  for(int i=1;i<=r;i++) gets(map[i]+1);//读图
      |                                     ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6496,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:59:37: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   59 |  for(int i=1;i<=r;i++) gets(map[i]+1);//读图
      |                                     ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6496,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:58:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   58 |  scanf("%d%d",&r,&c); gets(map[0]);//吞掉换行符QwQ
      |  ~~~~~^~~~~~~~~~~~~~
foo.cc:58:27: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
   58 |  scanf("%d%d",&r,&c); gets(map[0]);//吞掉换行符QwQ
      |                       ~~~~^~~~~~~~
foo.cc:59:28: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
   59 |  for(int i=1;i<=r;i++) gets(map[i]+1);//读图
      |                        ~~~~^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6496,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:1:
In function 'char* gets(char*)',
    inlined from 'int main()' at foo.cc:59:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:239:22: warning: call to '__gets_warn' declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [-Wattribute-warning]
  239 |   return __gets_warn (__str);
      |          ~~~~~~~~~~~~^~~~~~~
/usr/bin/ld: /tmp/cclI6vH1.o: in function `main':
foo.cc:(.text.startup+0x63): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: foo.cc:(.text.startup+0x3f): warning: the `gets' function is dangerous and should not be used.
正在同步测试数据,请稍后
Found 5 testcases.
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 384.0 KiB
#2 Accepted 2ms 384.0 KiB
#3 Accepted 2ms 384.0 KiB
#4 Accepted 3ms 384.0 KiB
#5 Accepted 2ms 384.0 KiB

信息

递交者
类型
递交
题目
P1164 [USACO06OCT] Cows on Skates G
题目数据
下载
语言
C++
递交时间
2022-05-22 22:40:55
评测时间
2022-05-22 22:45:21
评测机
分数
100
总耗时
13ms
峰值内存
384.0 KiB