Problem brick
User Tavern
Submission Time 2026-11-20 16:14:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int main()’:
brick.cpp:15:14: error: cannot convert ‘std::stack<int>::empty’ from type ‘bool (std::stack<int>::)() const’ to type ‘bool’
15 | while (!s.empty&&a[i]>=s.top()) {
| ^~~~~
brick.cpp:15:14: error: in argument to unary !
brick.cpp:21:10: error: ‘i’ was not declared in this scope
21 | cout<<a[i]
| ^