| Problem | minstack |
|---|---|
| User | emyz |
| Submission Time | 2025-12-13 03:46:57 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:8:27: error: ‘prevmin’ was not declared in this scope
8 | else stick.push({x,min(x,prevmin)});
| ^~~~~~~
minstack.cpp:8:36: error: no matching function for call to ‘std::stack<std::pair<int, int> >::push(<brace-enclosed initializer list>)’
8 | else stick.push({x,min(x,prevmin)});
| ^
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:233:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::stack<_Tp, _Sequence>::value_type = std::pair<int, int>]’
233 |