Problem bracketex
User gordonlu
Submission Time 2023-11-05 13:31:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:18:40: error: ‘valid’ was not declared in this scope
18 | } else if (bracketsStack.empty() || !valid(bracketsStack.top(), x)) {
| ^~~~~
bracketex.cpp:24:32: error: expected ‘)’ before ‘:’ token
24 | cout << (bracketsStack.empty() : "Valid" ? "Invalid") << endl;
| ~ ^~
| )