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

Compile Error

minstack.cpp:2:1: error: ‘vector’ does not name a type
2 | vector<int> duck;
| ^~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:4:2: error: ‘duck’ was not declared in this scope
4 | duck.push_back(X);
| ^~~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:8:2: error: ‘duck’ was not declared in this scope
8 | duck.pop_back();
| ^~~~
minstack.cpp: In function ‘int top()’:
minstack.cpp:12:9: error: ‘duck’ was not declared in this scope
12 | return duck.back();
| ^~~~
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:17:21: error: ‘duck’ was not declared in this scope
17 | for(int i = 0; i < duck.size(); ++){
| ^~~~
minstack.cpp:17:36: error: expected primary-expression before ‘)’ token
17 | for(int i = 0; i < duck.size(); ++){
| ^