记录详情

Runtime Error

/in/foo.cc: In function 'int comp(char*)':
/in/foo.cc:8:16: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
    8 |         while(i<=strlen(s)-2)
      |               ~^~~~~~~~~~~~~
/in/foo.cc:12:37: warning: operation on 'top' may be undefined [-Wsequence-point]
   12 |                         case'+':abc[--top]+=abc[top+1];break;
      |                                     ^~~~~
/in/foo.cc:12:37: warning: operation on 'top' may be undefined [-Wsequence-point]
/in/foo.cc:13:37: warning: operation on 'top' may be undefined [-Wsequence-point]
   13 |                         case'-':abc[--top]-=abc[top+1];break;
      |                                     ^~~~~
/in/foo.cc:13:37: warning: operation on 'top' may be undefined [-Wsequence-point]
/in/foo.cc:14:37: warning: operation on 'top' may be undefined [-Wsequence-point]
   14 |                         case'*':abc[--top]*=abc[top+1];break;
      |                                     ^~~~~
/in/foo.cc:14:37: warning: operation on 'top' may be undefined [-Wsequence-point]
/in/foo.cc:15:37: warning: operation on 'top' may be undefined [-Wsequence-point]
   15 |                         case'/':abc[--top]/=abc[top+1];break;
      |                                     ^~~~~
/in/foo.cc:15:37: warning: operation on 'top' may be undefined [-Wsequence-point]
/in/foo.cc:7:25: warning: unused variable 'y' [-Wunused-variable]
    7 |         int top=0,i=0,x,y;
      |                         ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:25:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
   25 |         gets(s);
      |         ~~~~^~~
In file included from /usr/include/c++/12/cstdio:42,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:46,
                 from /in/foo.cc:1:
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/usr/bin/ld: /tmp/ccRoGkYy.o: in function `main':
foo.cc:(.text.startup+0xc): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Runtime Error 4ms 524.0 KiB
#2 Runtime Error 4ms 532.0 KiB
#3 Runtime Error 3ms 532.0 KiB
#4 Runtime Error 3ms 536.0 KiB
#5 Runtime Error 3ms 576.0 KiB

信息

递交者
类型
递交
题目
中缀表达式值(expr)
题目数据
下载
语言
C++
递交时间
2019-07-07 16:37:14
评测时间
2025-09-23 07:10:25
评测机
分数
0
总耗时
19ms
峰值内存
576.0 KiB