Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i=x;i<(int)n;i++)
#define rep(i,n) REP(i,0,n)
#define sp(p) cout<<setprecision(16)<<fixed<<p<<endl;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(a))
#define UNIQ(a) unique(all(a))
#define UNIQNUM(a) UNIQ(a)-a.begin()
#define UNIQIT(a) a.erase(UNIQ(a), a.end());
#define VOUT(v,i) cout<<#v<<": ";for(int i=0;i<(int)v.size();i++){cout<<v[i]<<" ";}cout<<"\n";
#define vout(v) VOUT(v,z);
#define vmin(v) *min_element(all(v))
#define vmax(v) *max_element(all(v))
#define vsum(v) accumulate(all(v), 0LL);
#define MOUT(m,r,c) rep(i,r){rep(j,c){cout<<m[i][j]<<" ";}cout<<endl;}
#define mout(m) MOUT(m,m.size(),m[0].size())
#define debg(a) cout<<#a<<": "<<a<<endl;
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define digit(a) to_string(a).length();
template<class T>inline int out(const T &t){ print(t); putchar('\n'); return 0; }
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef vector<ll> V;
// const long long MOD=1000000007;
const long long INF = 1e18;
#define EPS (1e-7)
#define PI (acos(-1))
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) { a = b; return true; }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) { a = b; return true; }
    return false;
}


void solve_WA(long long N, long long M, std::vector<long long> p, std::vector<std::string> S){
    ll cntwa=0, cntac=0;
    vector<bool> f(10e5+10, false);
    for (ll i = 0; i < M; i++) {
        ll idx = p[i];
        if(f[idx]==false && S[i]=="WA"){
            cntwa++;
        }else if(f[idx]==false && S[i]=="AC"){
            cntac++;
            f[idx]=true;
        }
    }
    cout << cntac << ' ' << cntwa << "\n";
}

void solve(long long N, long long M, std::vector<long long> p, std::vector<std::string> S){
    ll cntwa=0, cntac=0;
    vector<bool> f(10e5+10, false);
    for (ll i = 0; i < M; i++) {
        if(f[p[i]]==false){
            if(S[i]=="WA") cntwa++;
            if(S[i]=="AC") {
                cntac++;
                f[p[i]]=true;
        }
    }
    cout << cntac << ' ' << cntwa << "\n";
}

int main(){
    long long N;
    scanf("%lld",&N);
    long long M;
    scanf("%lld",&M);
    std::vector<long long> p(M);
    std::vector<std::string> S(M);
    for(int i = 0 ; i < M ; i++){
        scanf("%lld",&p[i]);
        std::cin >> S[i];
    }
    solve(N, M, std::move(p), std::move(S));
    return 0;
}


Compiler output:
a.cc: In function 'void solve(long long int, long long int, std::vector<long long int>, std::vector<std::__cxx11::basic_string<char> >)':
a.cc:75:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   75 | int main(){
      |         ^~
a.cc:75:9: note: remove parentheses to default-initialize a variable
   75 | int main(){
      |         ^~
      |         --
a.cc:75:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:75:11: error: a function-definition is not allowed here before '{' token
   75 | int main(){
      |           ^
a.cc:88:2: error: expected '}' at end of input
   88 | }
      |  ^
a.cc:61:91: note: to match this '{'
   61 | void solve(long long N, long long M, std::vector<long long> p, std::vector<std::string> S){
      |                                                                                           ^