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

Compile Error

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