Language: C++

import java.util.Scanner;
class Main {
    int [][] cards = new int [5][15];
    private  static String[] cards2 = {"0","S","H","C","D"};
    int n,j,i,k,cards4,Nu;
    String cards3;
    public void yatary() {
        Scanner sc = new Scanner(System.in);
        for(j = 1;j <= 4;j++) {
            for(i = 1 ; i <= 13; i++) {
                k = i;
                cards[j][i] = k;
            }
        }
        n = sc.nextInt();
        for(k = 0 ; k < n ; k++) {
            cards3 = sc.next();
            cards4 = sc.nextInt();
            if(cards3.equals( "S" )) {
                Nu = 1;
            } else if(cards3.equals( "H" )) {
                Nu = 2;
            } else if(cards3.equals( "C" )) {
                Nu = 3;
            } else if(cards3.equals( "D" )) {
                Nu = 4;
            }
            switch(Nu) {
                case 1:
                    for(j = 1;j <= 13 ; j++) {
                        if(cards4 == cards[1][j]) {
                            cards[1][j] -= cards4;
                        }
                    }
                    break;
                case 2:
                    for(j = 1;j <= 13 ; j++) {
                        if(cards4 == cards[2][j]) {
                            cards[2][j] -= cards4;
                        }
                    }
                    break;
                case 3:
                    for(j = 1;j <= 13 ; j++) {
                        if(cards4 == cards[3][j]) {
                            cards[3][j] -= cards4;
                        }
                    }
                    break;
                case 4:
                    for(j = 1;j <= 13 ; j++) {
                        if(cards4 == cards[4][j]) {
                            cards[4][j] -= cards4;
                        }
                    }
                    break;
                default:
                    break;
            }
        }
        for(j = 1;j <= 4;j++) {
            for(i = 1;i <= 13;i++) {
                if(cards[j][i] != 0) {
                    System.out.printf("%S %d\n",cards2[j],cards[j][i]);
                }
            }
        }
    }
    public static void main(String[] agrs) {
        new Main().yatary();
    }

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:9: error: expected unqualified-id before '[' token
    3 |     int [][] cards = new int [5][15];
      |         ^
a.cc:4:12: error: expected ':' before 'static'
    4 |     private  static String[] cards2 = {"0","S","H","C","D"};
      |            ^ ~~~~~~
      |            :
a.cc:4:21: error: 'String' does not name a type
    4 |     private  static String[] cards2 = {"0","S","H","C","D"};
      |                     ^~~~~~
a.cc:6:5: error: 'String' does not name a type
    6 |     String cards3;
      |     ^~~~~~
a.cc:7:11: error: expected ':' before 'void'
    7 |     public void yatary() {
      |           ^~~~~
      |           :
a.cc:69:11: error: expected ':' before 'static'
   69 |     public static void main(String[] agrs) {
      |           ^~~~~~~
      |           :
a.cc:69:29: error: 'String' has not been declared
   69 |     public static void main(String[] agrs) {
      |                             ^~~~~~
a.cc:69:38: error: expected ',' or '...' before 'agrs'
   69 |     public static void main(String[] agrs) {
      |                                      ^~~~
a.cc:71:6: error: expected '}' at end of input
   71 |     }
      |      ^
a.cc:2:12: note: to match this '{'
    2 | class Main {
      |            ^
a.cc: In member function 'void Main::yatary()':
a.cc:8:9: error: 'Scanner' was not declared in this scope
    8 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:12:17: error: 'cards' was not declared in this scope; did you mean 'cards4'?
   12 |                 cards[j][i] = k;
      |                 ^~~~~
      |                 cards4
a.cc:15:13: error: 'sc' was not declared in this scope
   15 |         n = sc.nextInt();
      |             ^~
a.cc:17:13: error: 'cards3' was not declared in this scope; did you mean 'cards4'?
   17 |             cards3 = sc.next();
      |             ^~~~~~
      |             cards4
a.cc:31:38: error: 'cards' was not declared in this scope; did you mean 'cards4'?
   31 |                         if(cards4 == cards[1][j]) {
      |                                      ^~~~~
      |                                      cards4
a.cc:38:38: error: 'cards' was not declared in this scope; did you mean 'cards4'?
   38 |                         if(cards4 == cards[2][j]) {
      |                                      ^~~~~
      |                                      cards4
a.cc:45:38: error: 'cards' was not declared in this scope; did you mean 'cards4'?
   45 |                         if(cards4 == cards[3][j]) {
      |                                      ^~~~~
      |                                      cards4
a.cc:52:38: error: 'cards' was not declared in this scope; did you mean 'cards4'?
   52 |                         if(cards4 == cards[4][j]) {
      |                                      ^~~~~
      |                                      cards4
a.cc:63:20: error: 'cards' was not declared in this scope; did you mean 'cards4'?
   63 |                 if(cards[j][i] != 0) {
      |                    ^~~~~
      |                    cards4
a.cc:64:21: error: 'System' was not declared in this scope
   64 |                     System.out.printf("%S %d\n",cards2[j],cards[j][i]);
      |                     ^~~~~~
a.cc:64:49: error: 'cards2' was not declared in this scope; did you mean 'cards4'?
   64 |                     System.out.printf("%S %d\n",cards2[j],cards[j][i]);
      |                                                 ^~~~~~
      |                                                 cards4
a.cc: In static member function 'static void Main::main(int*)':
a.cc:70:19: error: expected ';' before '.' token
   70 |         new Main().yatary();
      |                   ^
a.cc: At global scope:
a.cc:71:6: error: expected unqualified-id at end of input
   71 |     }
      |      ^