记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:42:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<s.size();i++){
              ~^~~~~~~~~
foo.cc:43:13: warning: array subscript has type 'char' [-Wchar-subscripts]
   if(bd[s[i]]){//如果我是运算符 
             ^
foo.cc:44:17: warning: array subscript has type 'char' [-Wchar-subscripts]
    if(!bd[s[i-1]])hz+='.'; //且前一位是数字,则用.间隔 后缀表达式中的数字 
                 ^
foo.cc:45:14: warning: array subscript has type 'char' [-Wchar-subscripts]
    if(bd[s[i]]==1)st2.push(s[i]);//如果是左括号,则直接进栈 
              ^
foo.cc:46:19: warning: array subscript has type 'char' [-Wchar-subscripts]
    else if(bd[s[i]]==5){//如果是右括号 
                   ^
foo.cc:56:38: warning: array subscript has type 'char' [-Wchar-subscripts]
      while(!st2.empty()&&bd[st2.top()]>=bd[s[i]]){//若栈顶优先级>=当前符号 意思是我的优先级较小 且栈不为空 则把栈顶的高优先级符号先加入到后缀表达式  
                                      ^
foo.cc:56:48: warning: array subscript has type 'char' [-Wchar-subscripts]
      while(!st2.empty()&&bd[st2.top()]>=bd[s[i]]){//若栈顶优先级>=当前符号 意思是我的优先级较小 且栈不为空 则把栈顶的高优先级符号先加入到后缀表达式  
                                                ^
foo.cc:66:22: warning: array subscript has type 'char' [-Wchar-subscripts]
  if(!bd[s[s.size()-1]])hz+='.';//如果末尾是数字 则加个点 
                      ^
foo.cc:73:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<hz.size();i++){
              ~^~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。
# 状态 耗时 内存占用
#1 Accepted 2ms 404.0 KiB
#2 Accepted 2ms 408.0 KiB
#3 Accepted 2ms 384.0 KiB
#4 Accepted 2ms 412.0 KiB
#5 Accepted 2ms 384.0 KiB

信息

递交者
类型
递交
题目
计算(calc)
题目数据
下载
语言
C++
递交时间
2021-03-19 13:12:18
评测时间
2021-03-19 13:12:18
评测机
分数
100
总耗时
13ms
峰值内存
412.0 KiB