Problem labs
User CKCodeBreaker55
Submission Time 2024-12-21 10:25:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

labs.cpp: In function ‘int main()’:
labs.cpp:22:5: error: no match for ‘operator[]’ (operand types are ‘std::map<std::set<std::__cxx11::basic_string<char> >, long long int>’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
22 | M[s].insert(i);
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from labs.cpp:1:
/usr/include/c++/9/bits/stl_map.h:490:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::set<std::__cxx11::basic_string<char> >; _Tp = long long int; _Compare = std::less<std::set<std::__cxx11::basic_string<char> > >; _Alloc = std::allocator<std::pair<const std::set<std::__cxx11::basic_string<char> >, long long int> >; std::map<_Key, _Tp, _Com