记录详情

Wrong Answer

/in/foo.cc: In function 'int main()':
/in/foo.cc:10:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  gets(s);
  ^~~~
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc:10:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  gets(s);
        ^
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc:11:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  gets(d);
  ^~~~
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc:11:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  gets(d);
        ^
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc:12:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  gets(t);
  ^~~~
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc:12:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
  gets(t);
        ^
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc: In function 'void ReplaceS(char*, char*, char*)':
/in/foo.cc:23:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(i=0;i<strlen(s);i+=gap)
          ~^~~~~~~~~~
/in/foo.cc:28:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(j=i,k=0;k<strlen(d);j++,k++)
                ~^~~~~~~~~~
/in/foo.cc:39:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(j=i+strlen(d),k=0;j<strlen(s);j++,k++)
                           ~^~~~~~~~~~
/in/foo.cc:44:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(j=i,k=0;k<strlen(t);j++,k++)
                 ~^~~~~~~~~~
/in/foo.cc:49:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(k=0;k<strlen(temp);j++,k++)
             ~^~~~~~~~~~~~~
/tmp/ccMgGWU7.o: In function `main':
foo.cc:(.text.startup+0x1f): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 1ms 212.0 KiB
#2 Accepted 1ms 232.0 KiB
#3 Accepted 1ms 224.0 KiB
#4 Wrong Answer 1ms 228.0 KiB
#5 Wrong Answer 1ms 212.0 KiB

信息

递交者
类型
递交
题目
4-3 爱情故事
语言
C++
递交时间
2020-05-16 20:33:54
评测时间
2020-05-16 20:33:54
评测机
分数
60
总耗时
9ms
峰值内存
232.0 KiB