Problem minstack
User JJ1234
Submission Time 2024-12-11 15:00:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:1:1: error: ‘vector’ does not name a type
1 | vector <int> minstack;
| ^~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:3:2: error: ‘minstack’ was not declared in this scope
3 | minstack.push_back(X);
| ^~~~~~~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:8:2: error: ‘minstack’ was not declared in this scope
8 | minstack.pop_back();
| ^~~~~~~~
minstack.cpp: In function ‘int top()’:
minstack.cpp:13:9: error: ‘minstack’ was not declared in this scope
13 | return minstack.front();
| ^~~~~~~~
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:17:24: error: ‘minstack’ was not declared in this scope
17 | auto it = min_element(minstack.begin(), minstack.end());
| ^~~~~~~~
minstack.cpp:17:12: error: ‘min_element’ was not declared in this scope
17 | auto it = min_element(minstack.begin(), minstack.end(