Problem bracketex
User personjs
Submission Time 2025-02-04 20:28:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:26:15: error: invalid use of member function ‘bool std::vector<_Tp, _Alloc>::empty() const [with _Tp = int; _Alloc = std::allocator<int>]’ (did you forget the ‘()’ ?)
26 | if (stack.empty || stack.back() != 0) {cout << "Invalid"; return 0;}
| ~~~~~~^~~~~
| ()
bracketex.cpp:29:15: error: invalid use of member function ‘bool std::vector<_Tp, _Alloc>::empty() const [with _Tp = int; _Alloc = std::allocator<int>]’ (did you forget the ‘()’ ?)
29 | if (stack.empty || stack.back() != 1) {cout << "Invalid"; return 0;}
| ~~~~~~^~~~~
| ()
bracketex.cpp:32:15: error: invalid use of member function ‘bool std::vector<_Tp, _Alloc>::empty() const [with _Tp = int; _Alloc = std::allocator<int>]’ (did you forget the ‘()’ ?)
32 | if (stack.empty || stack.back() != 2) {cout <