Problem bracketex
User YII1719
Submission Time 2023-11-08 15:57:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:5:9: error: ‘n’ was not declared in this scope
5 | cin >> n;
| ^
bracketex.cpp:7:10: error: ‘x’ was not declared in this scope
7 | cin >> x;
| ^
bracketex.cpp:10:4: error: ‘s’ was not declared in this scope
10 | s.push(x);
| ^
bracketex.cpp:11:27: error: ‘s’ was not declared in this scope
11 | } else if (x == ')' && !s.empty () && s.top() == '(') {
| ^
bracketex.cpp:24:6: error: ‘s’ was not declared in this scope
24 | if (s.empty())
| ^
bracketex.cpp:29:11: error: expected ‘;’ before ‘return’
29 | << "\n"
| ^
| ;
30 | return 0;
| ~~~~~~