Language: C++

#include<iostream>
#include<string>
#include<map>
using namespace std;

int main(){
  map<string, int> my_map;
  my_map.insert(pair<string, int>('AC',0));
  my_map.insert(pair<string, int>('WA',0));
  my_map.insert(pair<string, int>('TLE',0));
  my_map.insert(pair<string, int>('RE',0));
  int n;
  cin >> n;
  string tocmp;
  while(cin >> tocmp) {
  my_map[tocmp] += 1;
  }
  for (auto elem:my_map){
     cout << elem.first << " x " << elem.second << endl;
  }

}

Compiler output:
a.cc:8:35: warning: multi-character character constant [-Wmultichar]
    8 |   my_map.insert(pair<string, int>('AC',0));
      |                                   ^~~~
a.cc:9:35: warning: multi-character character constant [-Wmultichar]
    9 |   my_map.insert(pair<string, int>('WA',0));
      |                                   ^~~~
a.cc:10:35: warning: multi-character character constant [-Wmultichar]
   10 |   my_map.insert(pair<string, int>('TLE',0));
      |                                   ^~~~~
a.cc:11:35: warning: multi-character character constant [-Wmultichar]
   11 |   my_map.insert(pair<string, int>('RE',0));
      |                                   ^~~~
a.cc: In function 'int main()':
a.cc:8:41: error: no matching function for call to 'std::pair<std::__cxx11::basic_string<char>, int>::pair(int, int)'
    8 |   my_map.insert(pair<string, int>('AC',0));
      |                                         ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:913:28: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<std::__cxx11::basic_string<char>, _U1>::value) || (! std::is_same<int, _U2>::value)), std::__cxx11::basic_string<char>, int>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<std::__cxx11::basic_string<char>, _U1>::value) || (! std::is_same<int, _U2>::value)), std::__cxx11::basic_string<char>, int>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U2 = _U1; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = _U2; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  913 |         explicit constexpr pair(pair<_U1, _U2>&& __p)
      |                            ^~~~
/usr/include/c++/14/bits/stl_pair.h:913:28: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_pair.h:902:19: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<std::__cxx11::basic_string<char>, _U1>::value) || (! std::is_same<int, _U2>::value)), std::__cxx11::basic_string<char>, int>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<std::__cxx11::basic_string<char>, _U1>::value) || (! std::is_same<int, _U2>::value)), std::__cxx11::basic_string<char>, int>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U2 = _U1; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = _U2; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  902 |         constexpr pair(pair<_U1, _U2>&& __p)
      |                   ^~~~
/usr/include/c++/14/bits/stl_pair.h:902:19: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_pair.h:891:28: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && (! _ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U2 = _U1; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = _U2; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  891 |         explicit constexpr pair(_U1&& __x, _U2&& __y)
      |                            ^~~~
/usr/include/c++/14/bits/stl_pair.h:891:28: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_pair.h:890:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  890 |                          bool>::type=false>
      |                                      ^~~~~
/usr/include/c++/14/bits/stl_pair.h:881:19: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && _ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U2 = _U1; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = _U2; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  881 |         constexpr pair(_U1&& __x, _U2&& __y)
      |                   ^~~~
/usr/include/c++/14/bits/stl_pair.h:881:19: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_pair.h:880:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  880 |                          bool>::type=true>
      |                                      ^~~~
/usr/include/c++/14/bits/stl_pair.h:869:9: note: candidate: 'template<class _U2, typename std::enable_if<std::__and_<std::is_pointer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__not_<std::is_reference<_Tp> >, std::is_constructible<int, _U2>, std::__not_<std::is_constructible<int, const _U1&> >, std::__not_<std::is_convertible<_U2, int> > >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(__zero_as_null_pointer_constant, _U2&&, ...) [with typename std::enable_if<std::__and_<std::is_pointer<_Tp>, std::__not_<std::is_reference<_U1> >, std::is_constructible<_T2, _U2>, std::__not_<std::is_constructible<_T1, const _U1&> >, std::__not_<std::is_convertible<_U2, _T2> > >::value, bool>::type <anonymous> = _U2; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  869 |         pair(__zero_as_null_pointer_constant, _U2&& __y, ...)
      |         ^~~~
/usr/include/c++/14/bits/stl_pair.h:869:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_pair.h:866:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  866 |                              bool> = false>
      |                                      ^~~~~
/usr/include/c++/14/bits/stl_pair.h:856:9: note: candidate: 'template<class _U2, typename std::enable_if<std::__and_<std::is_pointer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__not_<std::is_reference<_Tp> >, std::is_constructible<int, _U2>, std::__not_<std::is_constructible<int, const _U1&> >, std::is_convertible<_U2, int> >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(__zero_as_null_pointer_constant, _U2&&, ...) [with typename std::enable_if<std::__and_<std::is_pointer<_Tp>, std::__not_<std::is_reference<_U1> >, std::is_constructible<_T2, _U2>, std::__not_<std::is_constructible<_T1, const _U1&> >, std::is_convertible<_U2, _T2> >::value, bool>::type <anonymous> = _U2; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  856 |         pair(__zero_as_null_pointer_constant, _U2&& __y, ...)
      |         ^~~~
/usr/include/c++/14/bits/stl_pair.h:856:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_pair.h:853:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  853 |                              bool> = true>
      |                                      ^~~~
/usr/include/c++/14/bits/stl_pair.h:843:9: note: candidate: 'template<class _U1, typename std::enable_if<std::__and_<std::__not_<std::is_reference<_Tp> >, std::is_pointer<int>, std::is_constructible<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, _U1>, std::__not_<std::is_constructible<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, const _U1&> >, std::__not_<std::is_convertible<_Iter, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, __zero_as_null_pointer_constant, ...) [with typename std::enable_if<std::__and_<std::__not_<std::is_reference<_U1> >, std::is_pointer<_T2>, std::is_constructible<_T1, _U1>, std::__not_<std::is_constructible<_T1, const _U1&> >, std::__not_<std::is_convertible<_Iter, _Iterator> > >::value, bool>::type <anonymous> = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = int]'
  843 |         pair(_U1&& __x, __zero_as_null_pointer_constant, ...)
      |         ^~~~
/usr/include/c++/14/bits/stl_pair.h:843:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_pair.h:840:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  840 |                              bool> = false>
      |                                      ^~~~~
/usr/include/c++/14/bits/stl_pair.h:830:9: note: candidate: 'template<class _U1, typename std::enable_if<std::__and_<std::__not_<std::is_reference<_Tp> >, std::is_pointer<int>, std::is_constructible<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, _U1>, std::__not_<std::is_constructible<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, const _U1&> >, std::is_convertible<_Iter, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, __zero_as_null_pointer_constant, ...) [with typename std::enable_if<std::__and_<std::__not_<std::is_reference<_U1> >, std::is_pointer<_T2>, std::is_constructible<_T1, _U1>, st