Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

class Program
{
    static void Main(string[] args)
    {
        var wrong_answer = new wrong_answer();
        wrong_answer.Solve();
    }
}

public class wrong_answer
{
    const int INF = 1 << 30;
    const long INFL = 1L << 60;
    const int MOD = 1000000007;
    const int MOD2 = 998244353;

    myinout IO = new myinout();
    Math2 mmath = new Math2();

    //functions





    public void Solve()
    {
        var o = IO.intm;
        var n = o[0];
        var m = o[1];
        var acc = 0;
        var wac = new int[n];
        var flag = new bool[n];
        
        for (int i = 0; i < n; ++i) flag[i] = false;

        for (int i = 0; i < m; ++i)
        {
            var oo = IO.strm;
            int p = int.Parse(oo[0]) - 1;
            var s = oo[1];

            if (!flag[p] && s == "AC")
            {
                acc++;
                flag[p] = true;
            }
            if (!flag[p] && s == "WA")
            {
                wac[p]++;
            }
        }
        int wa = 0;
        for (int i = 0; i < n;++i){
            if(flag[i])wa += wac[i];
        }
        IO.wri(acc + " "+wa);
    }



}





//b-aで降順

public class Math2
{
    public long[] fact;
    public long[] invfact;
    public void factoricalmodset(long N, long MOD = 1000000007)
    {
        fact = new long[N + 1];
        invfact = new long[N + 1];
        fact[0] = 1;

        for (long i = 1; i <= N; ++i)
        {
            fact[i] = fact[i - 1] * i % MOD;
        }
        invfact[N] = pow(fact[N], MOD - 2);

        for (long i = N; i > 0; --i)
        {
            invfact[i - 1] = invfact[i] * i % MOD;
        }

    }

    public long nCr(long n, long r, long MOD = 1000000007)
    {
        return (fact[n] * invfact[r] % MOD * invfact[n - r] % MOD);
    }

    public long pow(long i, long n, long MOD = 1000000007)
    {
        long res = 1;
        while (n > 0)
        {
            if ((n & 1) != 0) res = res * i % MOD;
            i = i * i % MOD;
            n >>= 1;
        }
        return res;
    }

    public long gcd(long i, long y)
    {
        while (y != 0)
        {
            var r = i % y;
            i = y;
            y = r;
        }
        return i;
    }

    public long lcm(long i, long y)
    {
        return i * y / gcd(i, y);
    }

    public Dictionary<long, int> primefactorization(long N)
    {
        var ret = new Dictionary<long, int>();

        for (long i = 2; i * i <= N; ++i)
        {
            int cnt = 0;
            while (N % i == 0)
            {
                cnt++;
                N /= i;
            }
            if (cnt != 0) ret[i] = cnt;

        }
        if (N >= 2) ret[N] = 1;

        return ret;

    }

    public List<long> divisorenumrate(long N)
    {
        var ret = new List<long>();

        for (long i = 1; i * i <= N; ++i)
        {

            if (N % i == 0)
            {
                ret.Add(i);
                ret.Add(N / i);
            }

        }

        return ret;

    }

    public void swap<T>(ref T a, ref T b)
    {
        var i = a;
        a = b;
        b = i;
    }

}

class myinout
{
    //in
    public string str => Console.ReadLine();

    public string[] strm => str.Split(' ');

    public long[] longm => strm.Select(long.Parse).ToArray();
    public int[] intm => strm.Select(int.Parse).ToArray();
    public char[] charm => str.ToArray();
    public double[] doublem => strm.Select(double.Parse).ToArray();
    public long long1 => longm[0];
    public int int1 => intm[0];
    public char char1 => charm[0];
    public double double1 => doublem[0];



    //out
    public void wri<T>(T i)
    {
        Console.WriteLine(i);
    }
    public void wri<T>(T[] i)
    {
        Console.WriteLine(string.Join(" ", i));
    }

    public void yn(bool i)
    {
        if (i) wri("Yes");
        else wri("No");
    }

}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System.Numerics;
      |       ^~~~~~
a.cc:10:22: error: 'string' has not been declared
   10 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:10:31: error: expected ',' or '...' before 'args'
   10 |     static void Main(string[] args)
      |                               ^~~~
a.cc:15:2: error: expected ';' after class definition
   15 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:12:9: error: 'var' was not declared in this scope
   12 |         var wrong_answer = new wrong_answer();
      |         ^~~
a.cc:13:9: error: 'wrong_answer' was not declared in this scope
   13 |         wrong_answer.Solve();
      |         ^~~~~~~~~~~~
a.cc: At global scope:
a.cc:17:1: error: expected unqualified-id before 'public'
   17 | public class wrong_answer
      | ^~~~~~
a.cc:77:1: error: expected unqualified-id before 'public'
   77 | public class Math2
      | ^~~~~~
a.cc:185:11: error: expected ':' before 'string'
  185 |     public string str => Console.ReadLine();
      |           ^~~~~~~
      |           :
a.cc:185:12: error: 'string' does not name a type
  185 |     public string str => Console.ReadLine();
      |            ^~~~~~
a.cc:187:11: error: expected ':' before 'string'
  187 |     public string[] strm => str.Split(' ');
      |           ^~~~~~~
      |           :
a.cc:187:12: error: 'string' does not name a type
  187 |     public string[] strm => str.Split(' ');
      |            ^~~~~~
a.cc:189:11: error: expected ':' before 'long'
  189 |     public long[] longm => strm.Select(long.Parse).ToArray();
      |           ^~~~~
      |           :
a.cc:189:16: error: expected unqualified-id before '[' token
  189 |     public long[] longm => strm.Select(long.Parse).ToArray();
      |                ^
a.cc:190:11: error: expected ':' before 'int'
  190 |     public int[] intm => strm.Select(int.Parse).ToArray();
      |           ^~~~
      |           :
a.cc:190:15: error: expected unqualified-id before '[' token
  190 |     public int[] intm => strm.Select(int.Parse).ToArray();
      |               ^
a.cc:191:11: error: expected ':' before 'char'
  191 |     public char[] charm => str.ToArray();
      |           ^~~~~
      |           :
a.cc:191:16: error: expected unqualified-id before '[' token
  191 |     public char[] charm => str.ToArray();
      |                ^
a.cc:192:11: error: expected ':' before 'double'
  192 |     public double[] doublem => strm.Select(double.Parse).ToArray();
      |           ^~~~~~~
      |           :
a.cc:192:18: error: expected unqualified-id before '[' token
  192 |     public double[] doublem => strm.Select(double.Parse).ToArray();
      |                  ^
a.cc:193:11: error: expected ':' before 'long'
  193 |     public long long1 => longm[0];
      |           ^~~~~
      |           :
a.cc:194:11: error: expected ':' before 'int'
  194 |     public int int1 => intm[0];
      |           ^~~~
      |           :
a.cc:195:11: error: expected ':' before 'char'
  195 |     public char char1 => charm[0];
      |           ^~~~~
      |           :
a.cc:196:11: error: expected ':' before 'double'
  196 |     public double double1 => doublem[0];
      |           ^~~~~~~
      |           :
a.cc:201:11: error: expected ':' before 'void'
  201 |     public void wri<T>(T i)
      |           ^~~~~
      |           :
a.cc:201:17: error: variable or field 'wri' declared void
  201 |     public void wri<T>(T i)
      |                 ^~~
a.cc:201:17: error: expected ';' at end of member declaration
  201 |     public void wri<T>(T i)
      |                 ^~~
      |                    ;
a.cc:201:20: error: expected unqualified-id before '<' token
  201 |     public void wri<T>(T i)
      |                    ^
a.cc:205:11: error: expected ':' before 'void'
  205 |     public void wri<T>(T[] i)
      |           ^~~~~
      |           :
a.cc:205:17: error: variable or field 'wri' declared void
  205 |     public void wri<T>(T[] i)
      |                 ^~~
a.cc:205:17: error: expected ';' at end of member declaration
  205 |     public void wri<T>(T[] i)
      |                 ^~~
      |                    ;
a.cc:205:20: error: expected unqualified-id before '<' token
  205 |     public void wri<T>(T[] i)
      |                    ^
a.cc:210:11: error: expected ':' before 'void'
  210 |     public void yn(bool i)
      |           ^~~~~
      |           :
a.cc:216:2: error: expected ';' after class definition
  216 | }
      |  ^
      |  ;
a.cc:193:24: error: expected primary-expression before '>' token
  193 |     public long long1 => longm[0];
      |                        ^
a.cc:193:26: error: 'longm' was not declared in this scope; did you mean 'long1'?
  193 |     public long long1 => longm[0];
      |                          ^~~~~
      |                          long1
a.cc:194:22: error: expected primary-expression before '>' token
  194 |     public int int1 => intm[0];
      |                      ^
a.cc:194:24: error: 'intm' was not declared in this scope; did you mean 'int1'?
  194 |     public int int1 => intm[0];
      |                        ^~~~
      |                        int1
a.cc:195:24: error: expected primary-expression before '>' token
  195 |     public char char1 => charm[0];
      |                        ^
a.cc:195:26: error: 'charm' was not declared in this scope; did you mean 'char1'?
  195 |     public char char1 => charm[0];
      |                          ^~~~~
      |                          char1
a.cc:196:28: error: expected primary-expression before '>' token
  196 |     public double double1 => doublem[0];
      |                            ^
a.cc:196:30: error: 'doublem' was not declared in this scope; did you mean 'double1'?
  196 |     public double double1 => doublem[0];
      |                              ^~~~~~~
      |                              double1
a.cc: In member function 'void myinout::yn(bool)':
a.cc:212:16: error: 'wri' was not declared in this scope
  212 |         if (i) wri("Yes");
      |                ^~~
a.cc:213:14: error: 'wri' was not declared in this scope
  213 |         else wri("No");
      |              ^~~