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

Compile Error

minstack.cpp:10:14: error: expected initializer before numeric constant
10 | const ll mod 1e9 + 7
| ^~~
minstack.cpp:14:11: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
14 | int min = mod;
| ^~~
| modf
minstack.cpp:15:15: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
15 | int nextmin = mod;
| ^~~
| modf
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