| Problem | bracketex |
|---|---|
| User | xiaohaoxuan |
| Submission Time | 2026-04-25 10:36:42 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
bracketex.cpp: In function ‘int main()’:
bracketex.cpp:11:5: error: ‘stack’ was not declared in this scope
11 | stack<char> s;
| ^~~~~
bracketex.cpp:4:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
3 | #include <vector>
+++ |+#include <stack>
4 | using namespace std;
bracketex.cpp:11:11: error: expected primary-expression before ‘char’
11 | stack<char> s;
| ^~~~
bracketex.cpp:20:13: error: ‘s’ was not declared in this scope
20 | s.push(v[i]);
| ^
bracketex.cpp:23:28: error: ‘s’ was not declared in this scope
23 | if ('(' == s.top()) {
| ^
bracketex.cpp:30:28: error: ‘s’ was not declared in this scope
30 | if ('{' == s.top()) {
| ^
bracketex.cpp:37:28: error: ‘s’ w