Problem minstack
User Denzio321
Submission Time 2023-07-22 19:16:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:5:23: error: template argument 1 is invalid
5 | stack<pair<long,long> m;
| ^
minstack.cpp:5:23: error: template argument 2 is invalid
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:10:6: error: ‘m’ was not declared in this scope
10 | if(m.empty() or m.top() > X){
| ^
minstack.cpp: In function ‘void pop()’:
minstack.cpp:20:9: error: ‘m’ was not declared in this scope
20 | if(c==m.top().second){
| ^
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:32:9: error: ‘m’ was not declared in this scope
32 | return m.top();
| ^