Language: Java

import java.util.Scanner;

public class Main{

	Scanner sc =  new Scanner(System.in);

	int a = sc.nextInt();
	int A[] = new int[a];
	int B[] = new int[a];
	int C[] = new int[a];
	int X[] = new int[a];

	public static void main(String[] args){
		for(int i = 0;i < a;i++){
			A[i] = sc.nextInt();
		}
		sort(A);
		for(int i = 0;i < a;i++){
			B[i] = sc.nextInt();
		}
		sort(B);
		for(int i = 0;i < a;i++){
			C[i] = sc.nextInt();
		}
		sort(C);
		int count = 0;
		for(int i = 0;i < a;i++){
			for(int j = 0;j < a;j++){
				if(A[i] < B[j]){
					for(int l = 0;l < a;l++){
						if(B[j] < C[l]){
							count++;
						}
					}
				}
			}
		}
		System.out.println(count);
	}

	void sort(int X[]){		//昇順
		int min = 0;
		int max = 0;
		for(int i = 0;i<a;i++){
			for(int j=i+1;j<a;j++){
				if(X[i] > X[j]){
					max = X[i];
					X[i] =X[j];
					X[j] = max;

				}
			}
		}
	}

}


Compiler output:
Main.java:14: error: non-static variable a cannot be referenced from a static context
		for(int i = 0;i < a;i++){
		                  ^
Main.java:15: error: non-static variable A cannot be referenced from a static context
			A[i] = sc.nextInt();
			^
Main.java:15: error: non-static variable sc cannot be referenced from a static context
			A[i] = sc.nextInt();
			       ^
Main.java:17: error: non-static variable A cannot be referenced from a static context
		sort(A);
		     ^
Main.java:17: error: non-static method sort(int[]) cannot be referenced from a static context
		sort(A);
		^
Main.java:18: error: non-static variable a cannot be referenced from a static context
		for(int i = 0;i < a;i++){
		                  ^
Main.java:19: error: non-static variable B cannot be referenced from a static context
			B[i] = sc.nextInt();
			^
Main.java:19: error: non-static variable sc cannot be referenced from a static context
			B[i] = sc.nextInt();
			       ^
Main.java:21: error: non-static variable B cannot be referenced from a static context
		sort(B);
		     ^
Main.java:21: error: non-static method sort(int[]) cannot be referenced from a static context
		sort(B);
		^
Main.java:22: error: non-static variable a cannot be referenced from a static context
		for(int i = 0;i < a;i++){
		                  ^
Main.java:23: error: non-static variable C cannot be referenced from a static context
			C[i] = sc.nextInt();
			^
Main.java:23: error: non-static variable sc cannot be referenced from a static context
			C[i] = sc.nextInt();
			       ^
Main.java:25: error: non-static variable C cannot be referenced from a static context
		sort(C);
		     ^
Main.java:25: error: non-static method sort(int[]) cannot be referenced from a static context
		sort(C);
		^
Main.java:27: error: non-static variable a cannot be referenced from a static context
		for(int i = 0;i < a;i++){
		                  ^
Main.java:28: error: non-static variable a cannot be referenced from a static context
			for(int j = 0;j < a;j++){
			                  ^
Main.java:29: error: non-static variable A cannot be referenced from a static context
				if(A[i] < B[j]){
				   ^
Main.java:29: error: non-static variable B cannot be referenced from a static context
				if(A[i] < B[j]){
				          ^
Main.java:30: error: non-static variable a cannot be referenced from a static context
					for(int l = 0;l < a;l++){
					                  ^
Main.java:31: error: non-static variable B cannot be referenced from a static context
						if(B[j] < C[l]){
						   ^
Main.java:31: error: non-static variable C cannot be referenced from a static context
						if(B[j] < C[l]){
						          ^
22 errors