Language: C++

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        int[] A = new int[N];
        int[] B = new int[N];
        int[] C = new int[N];
        
        for(int i = 0 ; i < N ; i++){
            A[i] = sc.nextInt();
        }
        for(int i = 0 ; i < N ; i++){
            B[i] = sc.nextInt();
        }
        for(int i = 0 ; i < N ; i++){
            C[i] = sc.nextInt();
        }
        sc.close();
        
        Arrays.sort(A);
        Arrays.sort(C);
        
        int countA = 0;
        int countC = 0;
        int ans = 0;
        for(int i = 0 ; i < N ; i++){
            for(int j = 0 ; j < N ; j++){
                if(B[i] - A[j] > 0){
                    countA++;
                }
                if(C[N-1-j] - B[i] > 0){
                    countC++;
                }
                if(B[i] <= A[j] && C[N-1-j] <= B[i]){
                    break;
                }
            }
        ans += countA * countC;
        countA = 0;
        countC = 0;
        }
        
        System.out.println(ans);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:48:2: error: expected ';' after class definition
   48 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
    5 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:6:17: error: 'sc' was not declared in this scope
    6 |         int N = sc.nextInt();
      |                 ^~
a.cc:8:12: error: structured binding declaration cannot have type 'int'
    8 |         int[] A = new int[N];
      |            ^~
a.cc:8:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:12: error: empty structured binding declaration
a.cc:8:15: error: expected initializer before 'A'
    8 |         int[] A = new int[N];
      |               ^
a.cc:9:12: error: structured binding declaration cannot have type 'int'
    9 |         int[] B = new int[N];
      |            ^~
a.cc:9:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:12: error: empty structured binding declaration
a.cc:9:15: error: expected initializer before 'B'
    9 |         int[] B = new int[N];
      |               ^
a.cc:10:12: error: structured binding declaration cannot have type 'int'
   10 |         int[] C = new int[N];
      |            ^~
a.cc:10:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:12: error: empty structured binding declaration
a.cc:10:15: error: expected initializer before 'C'
   10 |         int[] C = new int[N];
      |               ^
a.cc:13:13: error: 'A' was not declared in this scope
   13 |             A[i] = sc.nextInt();
      |             ^
a.cc:16:13: error: 'B' was not declared in this scope
   16 |             B[i] = sc.nextInt();
      |             ^
a.cc:19:13: error: 'C' was not declared in this scope
   19 |             C[i] = sc.nextInt();
      |             ^
a.cc:23:9: error: 'Arrays' was not declared in this scope
   23 |         Arrays.sort(A);
      |         ^~~~~~
a.cc:23:21: error: 'A' was not declared in this scope
   23 |         Arrays.sort(A);
      |                     ^
a.cc:24:21: error: 'C' was not declared in this scope
   24 |         Arrays.sort(C);
      |                     ^
a.cc:31:20: error: 'B' was not declared in this scope
   31 |                 if(B[i] - A[j] > 0){
      |                    ^
a.cc:34:31: error: 'B' was not declared in this scope
   34 |                 if(C[N-1-j] - B[i] > 0){
      |                               ^
a.cc:37:20: error: 'B' was not declared in this scope
   37 |                 if(B[i] <= A[j] && C[N-1-j] <= B[i]){
      |                    ^
a.cc:46:9: error: 'System' was not declared in this scope
   46 |         System.out.println(ans);
      |         ^~~~~~