Problem platonic28
User emyz
Submission Time 2025-12-22 11:40:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

platonic28.cpp: In function ‘int main()’:
platonic28.cpp:39:3: error: ‘mx’ was not declared in this scope; did you mean ‘m’?
39 | mx=max(mx,freq[a]);
| ^~
| m
platonic28.cpp:39:17: error: ambiguous overload for ‘operator[]’ (operand types are ‘std::map<char, long long int>’ and ‘char [n]’)
39 | mx=max(mx,freq[a]);
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from platonic28.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 = char; _Tp = long long int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_K