Problem minstack
User lunghu
Submission Time 2024-12-11 15:10:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘void push(int)’:
minstack.cpp:5:2: error: ‘v’ was not declared in this scope
5 | v.push_back(x);
| ^
minstack.cpp:5:14: error: ‘x’ was not declared in this scope
5 | v.push_back(x);
| ^
minstack.cpp:6:2: error: ‘mn’ was not declared in this scope; did you mean ‘yn’?
6 | mn.push_back(min(mn.bak(), x));
| ^~
| yn
minstack.cpp: In function ‘void pop()’:
minstack.cpp:11:2: error: ‘v’ was not declared in this scope
11 | v.pop_back();
| ^
minstack.cpp:12:2: error: ‘mn’ was not declared in this scope; did you mean ‘yn’?
12 | mn.pop_back();
| ^~
| yn
minstack.cpp: In function ‘int top()’:
minstack.cpp:17:9: error: ‘v’ was not declared in this scope
17 | return v.back();
| ^
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:22:9: error: ‘mn’ was not declared in this scope; did you mean ‘yn’?<