Problem | minstack |
---|---|
User | CodeElvinn |
Submission Time | 2023-01-22 21:18:14 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:11:5: error: reference to ‘map’ is ambiguous
11 | map[val]++;
| ^~~
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from minstack.cpp:1:
/usr/include/c++/9/bits/stl_map.h:100:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
100 | class map
| ^~~
minstack.cpp:6:14: note: ‘std::map<int, int> map’
6 | map<int,int> map;
| ^~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:17:10: error: reference to ‘map’ is ambiguous
17 | if(--map[temp] ==0 )map.erase(temp);
| ^~~
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from