Problem duckhunt5
User ethantanaki
Submission Time 2026-05-16 09:30:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt5.cpp: In function ‘int main()’:
duckhunt5.cpp:23:22: error: taking address of rvalue [-fpermissive]
23 | for(a = &ms.begin(); a != &ms.end(); a++) {
| ^
duckhunt5.cpp:23:22: error: no match for ‘operator=’ (operand types are ‘std::multiset<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’} and ‘std::multiset<int>::iterator*’ {aka ‘std::_Rb_tree_const_iterator<int>*’})
In file included from /usr/include/c++/9/map:60,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from duckhunt5.cpp:1:
/usr/include/c++/9/bits/stl_tree.h:326:12: note: candidate: ‘constexpr std::_Rb_tree_const_iterator<int>& std::_Rb_tree_const_iterator<int>::operator=(const std::_Rb_tree_const_iterator<int>&)’
326 | struct _Rb_tree_const_iterator
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:326:12: note: no known c