| Problem | minstack |
|---|---|
| User | gelastropod |
| Submission Time | 2025-09-22 18:30:02 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
minstack.cpp:6:1: error: ‘e’ does not name a type
6 | e = 0;
| ^
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:10:4: error: ‘e’ was not declared in this scope
10 | v[e++] = X;
| ^
minstack.cpp:11:20: error: no matching function for call to ‘std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)’
11 | pq.push({X, e - 1});
| ^
In file included from /usr/include/c++/9/queue:64,
from minstack.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:627:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Comp