Problem minstack
User ansel
Submission Time 2024-05-22 10:44:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘void push(int)’:
minstack.cpp:2:5: error: ‘s’ was not declared in this scope
2 | s.push_back(X);
| ^
minstack.cpp: In function ‘void pop()’:
minstack.cpp:5:5: error: ‘s’ was not declared in this scope
5 | s.pop_back();
| ^
minstack.cpp: In function ‘int top()’:
minstack.cpp:8:12: error: ‘s’ was not declared in this scope
8 | return s[s.size()-1];
| ^
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:11:10: error: ‘s’ was not declared in this scope
11 | sort(s.begin(),s.end());
| ^
minstack.cpp:11:5: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
11 | sort(s.begin(),s.end());
| ^~~~
| short