记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:9:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::stack<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  for(int i=0;i<s.size();i++)
      |              ~^~~~~~~~~
foo.cc:11:11: error: no match for 'operator[]' (operand types are 'std::stack<char>' and 'int')
   11 |   char t=s[i];
      |           ^
foo.cc:16:13: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   16 |    if(u=='('&&t!=')'||u=='['&&t!=']')
      |       ~~~~~~^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1361 5A 括号序列
语言
C++
递交时间
2022-04-28 17:38:26
评测时间
2022-04-28 17:38:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes