answer.code: In function ‘void solve()’:
answer.code:10:10: error: no match for ‘operator[]’ (operand types are ‘std::map<char, int>’ and ‘std::pair<const char, int>’)
10 | M[c]++;
| ^
In file included from /usr/include/c++/13/map:63,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152,
from answer.code:1:
/usr/include/c++/13/bits/stl_map.h:504:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = char]’
504 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:504:34: note: no known conversion for argument 1 from ‘std::pair<const char, int>’ to ‘const std::map<char, int>::key_type&’ {aka ‘const char&’}
504 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_map.h:524:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = char]’
524 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from ‘std::pair<const char, int>’ to ‘std::map<char, int>::key_type&&’ {aka ‘char&&’}
524 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
answer.code:19:15: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
19 | for (auto [c, cc] : M) {
| ^
answer.code:22:15: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
22 | for (auto [c, cc] : M) {
| ^