answer.code: In function ‘int main()’:
answer.code:40:32: error: no match for ‘operator[]’ (operand types are ‘std::unordered_map<char, std::unordered_set<std::__cxx11::basic_string<char> > >’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
40 | problemSolvedBy[problemId].insert(teamName);
| ^
In file included from /usr/include/c++/13/unordered_map:41,
from answer.code:2:
/usr/include/c++/13/bits/unordered_map.h:986:7: note: candidate: ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = char; _Tp = std::unordered_set<std::__cxx11::basic_string<char> >; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<std::pair<const char, std::unordered_set<std::__cxx11::basic_string<char> > > >; mapped_type = std::unordered_set<std::__cxx11::basic_string<char> >; key_type = char]’
986 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/unordered_map.h:986:34: note: no known conversion for argument 1 from ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const std::unordered_map<char, std::unordered_set<std::__cxx11::basic_string<char> > >::key_type&’ {aka ‘const char&’}
986 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/unordered_map.h:990:7: note: candidate: ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&&) [with _Key = char; _Tp = std::unordered_set<std::__cxx11::basic_string<char> >; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<std::pair<const char, std::unordered_set<std::__cxx11::basic_string<char> > > >; mapped_type = std::unordered_set<std::__cxx11::basic_string<char> >; key_type = char]’
990 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/unordered_map.h:990:29: note: no known conversion for argument 1 from ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘std::unordered_map<char, std::unordered_set<std::__cxx11::basic_string<char> > >::key_type&&’ {aka ‘char&&’}
990 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
answer.code:47:63: warning: narrowing conversion of ‘entry.std::pair<const char, std::unordered_set<std::__cxx11::basic_string<char> > >::second.std::unordered_set<std::__cxx11::basic_string<char> >::size()’ from ‘std::unordered_set<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} to ‘int’ [-Wnarrowing]
47 | problems.push_back({entry.first, entry.second.size()});
| ~~~~~~~~~~~~~~~~~^~