Problem brick
User Aum
Submission Time 2024-03-26 21:54:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int32_t main()’:
brick.cpp:16:17: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator>’
16 | while (arr[i] > stack.top && !stack.empty){
| ~~~~~~ ^ ~~~~~~~~~
| | |
| | <unresolved overloaded function type>
| long long int
brick.cpp:16:39: error: cannot convert ‘std::stack<long long int>::empty’ from type ‘bool (std::stack<long long int>::)() const’ to type ‘bool’
16 | while (arr[i] > stack.top && !stack.empty){
| ^~~~~
brick.cpp:16:39: error: in argument to unary !