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

Compile Error

duckhunt5.cpp: In function ‘int main()’:
duckhunt5.cpp:23:24: error: cannot convert ‘std::multiset<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’} to ‘int’ in initialization
23 | for(int a = ms.begin(); a != ms.end(); a++) {
| ~~~~~~~~^~
| |
| std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}
duckhunt5.cpp:23:30: error: no match for ‘operator!=’ (operand types are ‘int’ and ‘std::multiset<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’})
23 | for(int a = ms.begin(); a != ms.end(); a++) {
| ~ ^~ ~~~~~~~~
| | |
| int std::multiset<int>::iterator {aka std::_Rb_tree_const_iterator<int>}
In file included from /usr/include/c++/9/regex:62,
from /usr/incl