Problem duckhunt17
User Elwinthenerd
Submission Time 2025-11-18 10:44:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt17.cpp: In function ‘int main()’:
duckhunt17.cpp:12:10: error: expected unqualified-id before ‘.’ token
12 | map.insert({i, {}});
| ^
duckhunt17.cpp:12:25: error: expected primary-expression before ‘)’ token
12 | map.insert({i, {}});
| ^
duckhunt17.cpp:20:21: error: no match for ‘operator=’ (operand types are ‘std::unordered_map<int, std::set<int> >::mapped_type’ {aka ‘std::set<int>’} and ‘int’)
20 | mp[a-1] = b-1;
| ^
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from duckhunt17.cpp:1:
/usr/include/c++/9/bits/stl_set.h:298:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>& std::set<_Key, _Compare, _Alloc>::operator=(const std::set<_Key, _Compare, _Alloc>&) [with _Key = int; _Compare = std::less<int>;