Problem brick
User hackerman123
Submission Time 2023-07-19 15:05:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int main()’:
brick.cpp:13:12: error: invalid use of member function ‘std::stack<_Tp, _Sequence>::size_type std::stack<_Tp, _Sequence>::size() const [with _Tp = long long int; _Sequence = std::deque<long long int, std::allocator<long long int> >; std::stack<_Tp, _Sequence>::size_type = long unsigned int]’ (did you forget the ‘()’ ?)
13 | while(s.size > 0 and j >= s.top()){
| ~~^~~~
| ()
brick.cpp:16:11: error: no matching function for call to ‘std::stack<long long int>::push()’
16 | s.push();
| ^
In file included from /usr/include/c++/9/stack:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:89,
from brick.cpp:1:
/usr/include/c++/9/bits/stl_stack.h:233:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = long long int; _Sequence = std::deque&