Problem bracketex
User Junxian
Submission Time 2026-04-18 10:40:52
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:13:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | if(!stk.empty() and stk.top() == "(") {
| ^~~
bracketex.cpp:21:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | if(!stk.empty() and stk.top() == "[") {
| ^~~
bracketex.cpp:29:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
29 | if(!stk.empty() and stk.top() == "{") {
| ^~~
bracketex.cpp:45:2: error: expected ‘}’ at end of input
45 | }
| ^
bracketex.cpp:4:11: note: to match this ‘{’
4 | int main(){
| ^