Problem minstack
User mew1323
Submission Time 2025-07-12 19:59:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘void pop()’:
minstack.cpp:17:19: error: no matching function for call to ‘std::stack<int>::pop(int&)’
17 | minstack.pop(X);
| ^
In file included from /usr/include/c++/9/stack:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:89,
from minstack.cpp:1:
/usr/include/c++/9/bits/stl_stack.h:266:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::pop() [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]’
266 | pop()
| ^~~
/usr/include/c++/9/bits/stl_stack.h:266:7: note: candidate expects 0 arguments, 1 provided