/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:69:5: 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:69:11: 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:78:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (i<strlen(s))      
          ~^~~~~~~~~~
/in/foo.cc:95:20: warning: operation on 'p' may be undefined [-Wsequence-point]
             number[--p]=number[p + 1];//当运算完成以后左括号已经没有意义,所以将指针p移向前一个运算符,并复制所得的结果 
                    ^~~
/in/foo.cc:104:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       }while (i<strlen(s)&&s[i-1]==')');//当检测到右括号时,可以运算括号内的内容 
               ~^~~~~~~~~~
/tmp/ccvxE7Gn.o: In function `main':
foo.cc:(.text.startup+0x10): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Runtime Error 1ms 216.0 KiB
#2 Runtime Error 1ms 232.0 KiB
#3 Runtime Error 1ms 220.0 KiB
#4 Runtime Error 1ms 228.0 KiB
#5 Runtime Error 1ms 224.0 KiB
#6 Runtime Error 1ms 228.0 KiB
#7 Runtime Error 1ms 224.0 KiB
#8 Runtime Error 1ms 232.0 KiB
#9 Runtime Error 1ms 220.0 KiB
#10 Runtime Error 1ms 228.0 KiB

信息

递交者
类型
递交
题目
P1849 表达式求值
语言
C++
递交时间
2019-07-15 11:12:49
评测时间
2019-07-15 11:12:49
评测机
分数
0
总耗时
11ms
峰值内存
232.0 KiB