Problem minstack
User Wenkai
Submission Time 2023-07-20 00:13:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:3:22: error: could not convert ‘{1.0e+9}’ from ‘<brace-enclosed initializer list>’ to ‘std::stack<int>’
3 | std::stack<int>m={1e9},s;void push(int X){m.push(std::min(X,m.top()));s.push(X);}void pop(){s.pop();m.pop();}int top(){return s.top();}int getMin(){return m.top();}
| ^
| |
| <brace-enclosed initializer list>