Problem minstack
User thermodynamix7
Submission Time 2026-07-12 19:45:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘void push(long long int)’:
minstack.cpp:9:23: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<=’
9 | if(minn.empty() or X <= minn.top)
| ~ ^~ ~~~~~~~~
| | |
| | <unresolved overloaded function type>
| long long int
minstack.cpp: At global scope:
minstack.cpp:25:11: error: ambiguating new declaration of ‘long long int top()’
25 | long long top() {
| ^~~
In file included from minstack.cpp:2:
minstack.h:5:5: note: old declaration ‘int top()’
5 | int top();
| ^~~
minstack.cpp:31:11: error: ambiguating new declaration of ‘long long int getMin()’
31 | long long getMin() {
| ^~~~~~
In file included from minstack.cpp:2:
minstack.h:7:5: note: old declaratio