Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC target("avx,avx2,fma,sse,sse2")
#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

using ll = long long;

#define N 200007

typedef tree<int, null_type, less<int>,rb_tree_tag,
tree_order_statistics_node_update> new_data;
int main()
{
    map<int,int>mp;
    int n,m,WA=0,AC=0;
    cin>>n>>m;
    int dp[n+5];
    set<int>s;
    for(int i=0;i<m;i++)
    {
        string s;
        int x;
        cin>>x>>s;
        if(s=="WA")
        {
            if(mp[x]==0)dp[x]++;
        }
        else if(s=="AC")
        {
            if(mp[x]==0)AC++,mp[x]=1,s.insert(x);
        }
    }
    for(auto i:s)if(mp[i])WA+=dp[i];
        cout<<AC<<" "<<WA<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:46: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int&)'
   37 |             if(mp[x]==0)AC++,mp[x]=1,s.insert(x);
      |                                      ~~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:6:
/usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1876 |         insert(const_iterator __p, _InputIterator __beg, _InputIterator __end)
      |         ^~~~~~
/usr/include/c++/14/bits/basic_string.h:1876:9: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:2069:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 2069 |         insert(size_type __pos, const _Tp& __svt)
      |         ^~~~~~
/usr/include/c++/14/bits/basic_string.h:2069:9: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 2086 |         insert(size_type __pos1, const _Tp& __svt,
      |         ^~~~~~
/usr/include/c++/14/bits/basic_string.h:2086:9: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
 1831 |       insert(const_iterator __p, size_type __n, _CharT __c)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:1831:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:1911:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
 1911 |       insert(const_iterator __p, initializer_list<_CharT> __l)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:1911:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:1939:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1939 |       insert(size_type __pos1, const basic_string& __str)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:1939:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1963 |       insert(size_type __pos1, const basic_string& __str,
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:1963:7: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1987 |       insert(size_type __pos, const _CharT* __s, size_type __n)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:1987:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:2007:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 2007 |       insert(size_type __pos, const _CharT* __s)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:2007:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 2032 |       insert(size_type __pos, size_type __n, _CharT __c)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:2032:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:2051:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(__const_iterator, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
 2051 |       insert(__const_iterator __p, _CharT __c)
      |       ^~~~~~
/usr/include/c++/14/bits/basic_string.h:2051:7: note:   candidate expects 2 arguments, 1 provided