Problem minstack
User idkhowtocode
Submission Time 2026-03-04 21:05:48
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> v;
| ^~~~~~
minstack.cpp:2:1: error: ‘vector’ does not name a type
2 | vector<int> k={INT_MAX};
| ^~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:4:5: error: ‘v’ was not declared in this scope
4 | v.push_back(x);
| ^
minstack.cpp:5:5: error: ‘k’ was not declared in this scope
5 | k.push_back(min(x,k.back()));
| ^
minstack.cpp:5:17: error: ‘min’ was not declared in this scope
5 | k.push_back(min(x,k.back()));
| ^~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:9:5: error: ‘v’ was not declared in this scope
9 | v.pop_back();
| ^
minstack.cpp:10:5: error: ‘k’ was not declared in this scope
10 | k.pop_back();
| ^
minstack.cpp: In function ‘int top()’:
minstack.cpp:14:12: error: ‘v’ was not declar