Problem minstack
User dzuizz
Submission Time 2023-06-12 18:59:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:8:1: error: ‘unordered_map’ does not name a type
8 | unordered_map<int, int> m;
| ^~~~~~~~~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:15:5: error: ‘m’ was not declared in this scope
15 | m[X]++;
| ^
minstack.cpp: In function ‘void pop()’:
minstack.cpp:19:5: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
19 | m[st.top()]--;
| ^
| tm
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:28:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
28 | while (!m[-pq.top()]) pq.pop();
| ^
| tm