Problem | bracketex |
---|---|
User | YII1719 |
Submission Time | 2023-11-08 16:02:59 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
bracketex.cpp:1:1: error: ‘stack’ does not name a type
1 | stack<char> s;
| ^~~~~
bracketex.cpp: In function ‘int main()’:
bracketex.cpp:6:2: error: ‘cin’ was not declared in this scope
6 | cin >> n;
| ^~~
bracketex.cpp:11:4: error: ‘s’ was not declared in this scope
11 | s.push(x);
| ^
bracketex.cpp:12:27: error: ‘s’ was not declared in this scope
12 | } else if (x == ')' && !s.empty () && s.top() == '(') {
| ^
bracketex.cpp:19:4: error: ‘cout’ was not declared in this scope
19 | cout << "invalid"
| ^~~~
bracketex.cpp:25:6: error: ‘s’ was not declared in this scope
25 | if (s.empty())
| ^
bracketex.cpp:26:3: error: ‘cout’ was not declared in this scope
26 | cout << "valid"
| ^~~~
bracketex.cpp:29:3: error: ‘cout’ was not declared in this scope
29 | cout << "invalid"