Problem minstack
User matt
Submission Time 2024-02-20 15:12:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

In file included from minstack.cpp:12:
minstack.h:1:1: error: expected ‘,’ or ‘;’ before ‘void’
1 | void push(int X);
| ^~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:19:8: error: reference to ‘min’ is ambiguous
19 | if (X<min) {
| ^~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from minstack.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3456:5: note: candidates are: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)’
3456 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3450:5: note: ‘template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)’
3450 | min(initializer_list<_Tp> __l)
| ^~~
In file included from /usr