Problem minstack
User maximushartanto
Submission Time 2025-07-03 11:10:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:5:1: error: ‘multiset’ does not name a type
5 | multiset<int> s;
| ^~~~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:8:7: error: ‘s’ was not declared in this scope
8 | a[s.size()] = x;
| ^
minstack.cpp: In function ‘void pop()’:
minstack.cpp:13:5: error: ‘s’ was not declared in this scope
13 | s.extract(a[s.size()-1]);
| ^
minstack.cpp: In function ‘int top()’:
minstack.cpp:17:14: error: ‘s’ was not declared in this scope
17 | return a[s.size() - 1];
| ^
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:21:13: error: ‘s’ was not declared in this scope
21 | return *s.begin();
| ^