Problem minstack
User CalebKow
Submission Time 2026-02-09 13:34:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘void push(long long int)’:
minstack.cpp:11:7: error: ‘class std::multiset<long long int>’ has no member named ‘push’
11 | mset.push(X);
| ^~~~
minstack.cpp: In function ‘long long int getMin()’:
minstack.cpp:24:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::multiset<long long int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<long long int>’})
24 | cout << mset.begin() << "\n";
| ~~~~ ^~ ~~~~~~~~~~~~
| | |
| | std::multiset<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,