/ Vijos /

记录详情

Runtime Error

foo.cc: In function 'int main()':
foo.cc:8:11: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    8 |     gets(b);
      |           ^
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 foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:8:11: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    8 |     gets(b);
      |           ^
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 foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:10:10: warning: array subscript has type 'char' [-Wchar-subscripts]
   10 |     a[b[i]]=i+'a';
      |       ~~~^
foo.cc:15:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |         for(j=0;j<c[i].length();j++)
      |                 ~^~~~~~~~~~~~~~
foo.cc:16:26: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |         c[i][j]=a[c[i][j]];
      |                          ^
foo.cc:8:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
    8 |     gets(b);
      |     ~~~~^~~
foo.cc:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   11 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
foo.cc:18:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   18 |     scanf("%d",&sn);
      |     ~~~~~^~~~~~~~~~
/usr/bin/ld: /tmp/ccVFwUuS.o: in function `main':
foo.cc:(.text.startup+0xb0): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Aborted 2ms 512.0 KiB
#2 Runtime Error Aborted 2ms 512.0 KiB
#3 Runtime Error Aborted 6ms 512.0 KiB
#4 Runtime Error Aborted 2ms 512.0 KiB
#5 Runtime Error Aborted 3ms 512.0 KiB
#6 Runtime Error Aborted 4ms 512.0 KiB
#7 Runtime Error Aborted 3ms 512.0 KiB
#8 Runtime Error Aborted 2ms 512.0 KiB
#9 Runtime Error Aborted 2ms 512.0 KiB
#10 Runtime Error Aborted 3ms 512.0 KiB

信息

递交者
类型
递交
题目
P1500 笨笨的单词排序
语言
C++
递交时间
2022-01-31 08:09:17
评测时间
2022-01-31 08:09:17
评测机
分数
0
总耗时
34ms
峰值内存
512.0 KiB