Problem minstack
User Kiameimon
Submission Time 2024-01-11 09:09:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:3:1: error: ‘vector’ does not name a type
3 | vector<int> v;
| ^~~~~~
minstack.cpp:4:1: error: ‘vector’ does not name a type
4 | vector<int> mn = {LLONG_MAX};
| ^~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:7:2: error: ‘v’ was not declared in this scope
7 | v.push_back(x);
| ^
minstack.cpp:8:2: error: ‘mn’ was not declared in this scope
8 | mn.push_back(min(mn.back(), x));
| ^~
minstack.cpp:8:15: error: ‘min’ was not declared in this scope
8 | mn.push_back(min(mn.back(), x));
| ^~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:12:2: error: ‘v’ was not declared in this scope
12 | v.pop_back();
| ^
minstack.cpp:13:2: error: ‘mn’ was not declared in this scope
13 | mn.pop_back();
| ^~
minstack.cpp: In function ‘int top()’:
minstack.cpp:17:9: error: ‘v’ was not declared in this sc