Language: Java

    import java.util.*;


    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            long n = sc.nextLong();
            long m = sc.nextLong();
            long a[][] = new int[m][2];
            if(m == 0){
                System.out.println("0 0");
            }else{
                for(long i=0;i<m;i++){
                    a[i][0] = sc.nextLong();
                    String wk = sc.next();
                    if(wk.equals("AC")){
                        a[i][1] = 0;
                    }else{
                        a[i][1] = 1;
                    }
                }
                System.out.println(ret(m,a));
            }
        }
        static String ret(Long m, Long[][] a){
            Map<Long, Long> b = new HashMap<>();
            Long ac = 0;
            Long wc = 0;
            for(Long i=0;i<m;i++) {
                if(b.containsKey(a[i][0])){
                    if(b.get(a[i][0]) == 1){
                        if(a[i][1] == 0){
                            ac ++;
                            b.put(a[i][0],a[i][1]);
                        }else{
                            wc ++;
                        }
                    }
                }else{
                    if(a[i][1] == 0){
                        ac ++;
                    }else{
                        wc ++;
                    }
                    b.put(a[i][0],a[i][1]);
                }
            }
            String ret = Long.toString(ac) + " " + Long.toString(wc);
            return ret;
        }
    }

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from long to int
            long a[][] = new int[m][2];
                                 ^
Main.java:9: error: incompatible types: int[][] cannot be converted to long[][]
            long a[][] = new int[m][2];
                         ^
Main.java:14: error: incompatible types: possible lossy conversion from long to int
                    a[i][0] = sc.nextLong();
                      ^
Main.java:17: error: incompatible types: possible lossy conversion from long to int
                        a[i][1] = 0;
                          ^
Main.java:19: error: incompatible types: possible lossy conversion from long to int
                        a[i][1] = 1;
                          ^
Main.java:22: error: incompatible types: long[][] cannot be converted to Long[][]
                System.out.println(ret(m,a));
                                         ^
Main.java:27: error: incompatible types: int cannot be converted to Long
            Long ac = 0;
                      ^
Main.java:28: error: incompatible types: int cannot be converted to Long
            Long wc = 0;
                      ^
Main.java:29: error: incompatible types: int cannot be converted to Long
            for(Long i=0;i<m;i++) {
                       ^
Main.java:30: error: incompatible types: Long cannot be converted to int
                if(b.containsKey(a[i][0])){
                                   ^
Main.java:31: error: incompatible types: Long cannot be converted to int
                    if(b.get(a[i][0]) == 1){
                               ^
Main.java:32: error: incompatible types: Long cannot be converted to int
                        if(a[i][1] == 0){
                             ^
Main.java:34: error: incompatible types: Long cannot be converted to int
                            b.put(a[i][0],a[i][1]);
                                    ^
Main.java:34: error: incompatible types: Long cannot be converted to int
                            b.put(a[i][0],a[i][1]);
                                            ^
Main.java:40: error: incompatible types: Long cannot be converted to int
                    if(a[i][1] == 0){
                         ^
Main.java:45: error: incompatible types: Long cannot be converted to int
                    b.put(a[i][0],a[i][1]);
                            ^
Main.java:45: error: incompatible types: Long cannot be converted to int
                    b.put(a[i][0],a[i][1]);
                                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
17 errors