criyle/codenet-compile-errors huggingface dataset:
Language: C++

/*
 * 2100.cpp
 *
 *  Created on: 2012/07/08
 *      Author: shimomire
 */

#include <iostream>
#include<string>
#include <complex>
#include<list>
#include<float.h>
#include <functional>
#include <vector>
#include <map>
#include <queue>

using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define REP0(i,n)   REP(i,0,n)
#define REPr(i,b,n) for(int i=n-1;i>=b;i--)
#define REPr0(i,n)   REPr(i,0,n)

#define foreach(it,o) for(__typeof((o).begin()) it=(o).begin(); it!=(o).end(); ++it)
#define ALL(o) (o).begin(),(o).end()
typedef complex<double> P;
bool operator <(const P& a, const P& b) {
	return abs(a) < abs(b);
}

int datanum,n;

int main(){
	cin >> datanum;

	REP0(datac,datanum){
		cin >>n;
		int data[n];
		int sub[n];
		REP0(i,n){
			cin >>data[i];
		}

		REP0(i,n-1){
			sub[i]=data[i+1]-data[i];
		}
		sort(sub,sub+n);
		cout<<max(sub[n-2],0)<<" "<<max(-sub[0],0)<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   47 |                 sort(sub,sub+n);
      |                 ^~~~
      |                 sqrt
Language: C++

#include <vector>
#include <iostream>
using namespace std;


int main(){
    int t;
    cin >> t;
    for (int i = 0; i < t; i++){
	int n;
	cin >> n;
	vector<int> height;
	int h;
	for (int j = 0; j < n; j++){
	    cin >> h;
	    height.push_back(h);
	}
	vector<int> diff;
	for (int j = 0; j < n-1; j++){
	    diff.push_back(height[j+1] - height[j]);
	}
	sort(diff.begin(), diff.end());
	if (diff[diff.size()-1] >= 0) cout << diff[diff.size()-1] << " ";
	else cout << 0 << " ";
	if (diff[0] <= 0) cout << -diff[0] << endl;
	else cout << 0 << endl;

    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |         sort(diff.begin(), diff.end());
      |         ^~~~
      |         short
Language: C++

import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		try {
			System.setIn(new FileInputStream("src/aoj2100/input.txt"));
			// System.setOut(new PrintStream(new FileOutputStream("src/aoj1172/result.txt")));
		} catch (FileNotFoundException e) {
		}
		new Main().run();
	}

	Scanner sc;
	void run() {
		sc = new Scanner(System.in);
		int T = sc.nextInt();
		while(T-- > 0) {
			solve();
		}
	}
	void solve(){
		int N = sc.nextInt();
		int[] a = new int[N];
		for (int i = 0; i < N; i++)
			a[i] = sc.nextInt();

		int A = 0, B = 0;
		for (int i = 1; i < N; i++) A = max(A, a[i] - a[i-1]);
		for (int i = 1; i < N; i++) B = max(B, a[i-1] - a[i]);
		System.out.println(A + " " + B);
	}

	void tr(Object... os) {
		System.err.println(deepToString(os));
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import static java.lang.Math.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import static java.util.Arrays.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int block[100];
    int cnt,n;
    int high,low;
    cin >> cnt;
    while(cnt--){
        high = 0;
        low = 0;
        memset(block,0,sizeof(block));
        cin >> n;
        for(int i=0;i<n;i++) cin >> block[i];
        for(int i=0;i<n-1;i++){
            if(block[i] - block[i+1] > 0 && high < block[i] - block[i+1]) high = block[i] - block[i+1];
            else if(block[i] - block[i+1] < 0 && low > block[i] - block[i+1]) low = block[i] - block[i+1];
        }
        cout << low*-1 << " "  << high << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(block,0,sizeof(block));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: Java

	long divisors(long n) {
		long sum = 0;
		for (long d = 2; d * d <= n; d++) {
			if (n % d == 0) {
				sum += d;
				if (d * d != n) sum += n / d;
			}
		}
		return sum + 1;
	}

	Scanner sc;
	void run() {
		sc = new Scanner(System.in);
		while(true) {
			int N = sc.nextInt();
			if (N == 0) break;
			if (N == 1) {
				System.out.println("deficient number");
				continue;
			}

			int s = (int) divisors(N);
			if (s > N) {
				System.out.println("abundant number");
			} else if (s < N) {
				System.out.println("deficient number");
			} else {
				System.out.println("perfect number");
			}
		}
	}


	void tr(Object... os) {
		System.err.println(deepToString(os));
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	long divisors(long n) {
	^
  (use --enable-preview to enable unnamed classes)
Main.java:38: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Scanner;

public class Main2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		while(true){
			int n=cin.nextInt();
			if(n==0)break;
			int cnt=0;
			for(int i=1;i*i<n;i++){
				if(n%i==0){
					cnt+=i;
					if(n/i!=i&&n/i!=n)
						cnt+=n/i;
				}
			}
			if(n>cnt){
				System.out.println("deficient number");
			}
			else if(n<cnt){
				System.out.println("abundant number");
			}
			else{
				System.out.println("perfect number");
			}
		}
		
	}

}

Compiler output:
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
       ^
1 error
Language: C

#include <cstdio>
using namespace std;
 
int main(){
    int n;
    while(scanf("%d", &n), n){
        int r = 2 * n;
        for(int i = 1; r >= 0 && i * i <= n; ++i){
            if(n % i == 0){
                r -= i;
                if(i * i != n){ r -= n / i; }
            }
        }
         
        if(r == 0){
            puts("perfect number");
        }
        else if(r < 0){
            puts("abundant number");
        }
        else{
            puts("deficient number");
        }
    }
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void){
  int N;
  int S=0;
  int i;
  while(1){
    S=0;
    scanf("%d",&N);
    if(N==0)
      break;
    for(i=1;i<N;i++){
      if(N%i==0)
	S+=i;
    if(N==S)
      printf("perfect number\n");
    else if(N>S)
      printf("deficient number\n");
    else 
      printf("abundant number\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include <iostream>
using namespace std;
int main(void){
    int n,s=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        if(n%i==0){s+=i;}
    }
    if(n==s){cout<<"perfect number";}
    else if(n>s){cout<<"deficient number";}
    else {cout<<"abundant number";}
    return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespacd std;

ibt main(){
  int n;
  while(cin >> n, n){
    int ans = 1;
    for(int i = 0;i*i < n; i++){
      if(n%i == 0){
	ans += i;
	if(n/i != i)ans += n/i;
      }
    }
    if(n != 1 && ans < n){
      cout << "deficient number" << endl;
    }else if(ans > n){
      cout << "abundant number" << endl;
    }else{
      cout << "perfect number" << endl;
    }
  }
  return 0;
}

    

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespacd'
    2 | using namespacd std;
      |       ^~~~~~~~~
a.cc:4:1: error: 'ibt' does not name a type; did you mean 'int'?
    4 | ibt main(){
      | ^~~
      | int
Language: C++

#include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a).end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int n;
    while(cin >> n,n){
        int sum = 0;
        range(i,1,sqrt(n) + 1){
            if(n % i == 0 && i != n){
                sum+=i;
                if(n / i != i && n / i != n) s+=n/i;
            }
        }
        if(sum > n){
            cout << "abundant number" << endl;
        }else if(sum < n){
            cout << "deficient number" << endl;
        }else{
            cout << "perfect number" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:46: error: 's' was not declared in this scope
   16 |                 if(n / i != i && n / i != n) s+=n/i;
      |                                              ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n;
	while(cin>>n&&n!=0){
		long long sum=0;
		for(int i=1;i<n;){
			if(n%i==0) sum+=i;
			if(n%2==1&&i%2==1) i+=2;
			else i++;
		}
		if(n==sum)cout<<"perfect number"<<endl;
		else if(sum<n)cout<<"
	}
}

Compiler output:
a.cc:13:37: warning: missing terminating " character
   13 |                 else if(sum<n)cout<<"
      |                                     ^
a.cc:13:37: error: missing terminating " character
a.cc: In function 'int main()':
a.cc:14:9: error: expected primary-expression before '}' token
   14 |         }
      |         ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
bool b[100001];
int main() {
	fill(b, b + 100001, true);
	vector<long long>c;
	b[0] = false;
	b[1] = false;
	for (int i = 2; i <= 100000; i++) {
		if (b[i]) {
			int j = 2;
			while (i*j <= 100000) {
				b[i*j] = false;
				j++;
			}
			c.push_back(i);
		}
	}
	long long  a = 6;
	while (cin >> a&&a != 0) {
		long long sum = 1,a2=a;
		vector<long long>::iterator it = c.begin();
		while (a != 1) {
			long long sum2 = 0;
			if (a % (*it) == 0) {
				int i = 1;
				while (a % (*it) == 0) {
					sum2 += pow((*it), i);
					i++;
					a /= (*it);
				}
				sum *= sum2;
			}
			it++;
		}
		if (a2 == sum) cout << "perfect number" << endl;
		else if (a2 > sum) cout << "deficient number" << endl;
		else cout << "abundant number" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:49: error: 'pow' was not declared in this scope
   31 |                                         sum2 += pow((*it), i);
      |                                                 ^~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	long long  a = 6;
	while (cin >> a&&a != 0) {
		long long sum = 1,a2=a;
		int i = 2;
		while (a != 1) {
			if (a%i == 0) {
				int j = 1;
				long long sum2 = 1;
				while (a%i == 0) {
					sum2 += (pow(i, j));
					j++;
					a /= i;
				}
				sum *= sum2;
			}
			i++;
		}
		sum -= a2;
		if (a2 == sum) cout << "perfect number" << endl;
		else if (a2 > sum) cout << "deficient number" << endl;
		else cout << "abundant number" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:50: error: 'pow' was not declared in this scope
   16 |                                         sum2 += (pow(i, j));
      |                                                  ^~~
Language: C++

#include<cstdio>

int yaksu(int a){
        int res=a;
        for(int i=1;i<=a/2;i++){
                if(a%i==0) res-=i;
                if(res<0) break;
        }
        return res;
}

int main(){
        int a,tc;
        while(1){
        scanf("%d",&a);
        if(a==0) return 0;
        tc=yaksu(a)
        if(tc>0) printf("deficient number\n");
        else if(tc==0) printf("perfect number\n");
        else printf("abundant number\n");
        }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before 'if'
   17 |         tc=yaksu(a)
      |                    ^
      |                    ;
   18 |         if(tc>0) printf("deficient number\n");
      |         ~~          
a.cc:19:9: error: 'else' without a previous 'if'
   19 |         else if(tc==0) printf("perfect number\n");
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int n, s, i;
	while (cin >> n && n)
	{
		if (n % 2) t = 2; else t = 1;
		for (i = 1+t, s = 1+t+n; i <= (int)((double)((n + 1) / 2)); i+=t)
		{
			if (n % i == 0)
			{
				if (i > 1)
				{
					if (i * i == n)
					{
						s += i;
						if (n > s)
						{
							cout << "deficient number" << endl;
							return 0;
						}
					}
					else
						s += i + n / i;
						if (n > s)
						{
							cout << "deficient number" << endl;
							return 0;
						}
				}
				else
				{
					s += i;
					if (n > s)
					{
						cout << "deficient number" << endl;
						return 0;
					}
				}
			}
		}
		if (n == s)	cout << "perfect number" << endl;
		else		cout << "abundant number" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 't' was not declared in this scope
    8 |                 if (n % 2) t = 2; else t = 1;
      |                            ^
a.cc:8:40: error: 't' was not declared in this scope
    8 |                 if (n % 2) t = 2; else t = 1;
      |                                        ^
a.cc:9:28: error: 't' was not declared in this scope
    9 |                 for (i = 1+t, s = 1+t+n; i <= (int)((double)((n + 1) / 2)); i+=t)
      |                            ^
Language: C++

main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}

Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:1:26: error: 'scanf' was not declared in this scope
    1 | main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
      |                          ^~~~~
a.cc:1:130: error: 'printf' was not declared in this scope
    1 | main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
      |                                                                                                                                  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
a.cc:1:176: error: 'printf' was not declared in this scope
    1 | main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
      |                                                                                                                                                                                ^~~~~~
a.cc:1:176: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:1:209: error: 'printf' was not declared in this scope
    1 | main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
      |                                                                                                                                                                                                                 ^~~~~~
a.cc:1:209: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h> int main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int main(){int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}return 0;}
      |                    ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<stdio.h>main(){
int n,s,i;for(;;){scanf("%d",&n);if(!n)break;for(i=1;i*i<=n;i++){if(n!=i){if(n%i==0){s+=i;if(i!=n/i){s+=n/i;}}}}if(s<2*n){printf("deficient number\n");}else if(s==2*n){printf("perfect number\n");}else{printf("abundant number\n");}s=0;}
return 0;}

Compiler output:
a.cc:1:22: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>main(){
      |                      ^
a.cc:1:9: fatal error: stdio.h>mai: No such file or directory
    1 | #include<stdio.h>main(){
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<math.h>
c,n;main(i){for(;scanf("%d",&n),n;printf("%s number\n",n>c?"deficient":n<c?"abundant":"perfect"),c=0)if(n>2)for(c=1,i=2;i<=sqrt(n);i++)if(n%i==0){c+=i;if(i!=n/i)c+=n/i;}}

Compiler output:
a.cc:2:1: error: 'c' does not name a type
    2 | c,n;main(i){for(;scanf("%d",&n),n;printf("%s number\n",n>c?"deficient":n<c?"abundant":"perfect"),c=0)if(n>2)for(c=1,i=2;i<=sqrt(n);i++)if(n%i==0){c+=i;if(i!=n/i)c+=n/i;}}
      | ^
a.cc:2:9: error: expected constructor, destructor, or type conversion before '(' token
    2 | c,n;main(i){for(;scanf("%d",&n),n;printf("%s number\n",n>c?"deficient":n<c?"abundant":"perfect"),c=0)if(n>2)for(c=1,i=2;i<=sqrt(n);i++)if(n%i==0){c+=i;if(i!=n/i)c+=n/i;}}
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	while(cin>>N,N==0){
		long long sum=0;
		for(int i=1;i<=N;i++){
			if(N%i==0)sum+=i;
		}
		if(N>sum)
			cout<<"deficient number"<<endl;
		else if(N>sum)
			cout<<"abundant number"<<endl;
		else
			cout<<"perfect number"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:20: error: 'N' was not declared in this scope
    4 |         while(cin>>N,N==0){
      |                    ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;


public class main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		String str;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int turn = Integer.parseInt(br.readLine());
		for(int i = 0; i < turn; i++){
			str = br.readLine();
			String[] num = str.split(" ");
			str = br.readLine();
			String[] rgb = str.split(" ");
			if(rgbDivide(num, rgb)){
				System.out.println("1");
			}else{
				System.out.println("0");
			}
		}
	}
	
	static boolean rgbDivide(String[] num, String[] rgb){
		ArrayList<Integer> R = new ArrayList<Integer>();
		ArrayList<Integer> G = new ArrayList<Integer>();
		ArrayList<Integer> B = new ArrayList<Integer>();
		for(int i = 0; i < num.length; i++){
			if(rgb[i].equals("R")){
				R.add(Integer.parseInt(num[i]));
			}else if(rgb[i].equals("G")){
				G.add(Integer.parseInt(num[i]));
			}else{
				B.add(Integer.parseInt(num[i]));
			}
		}
		if(3 <= R.size()){
			Collections.sort(R);
			if(numSearch(R)){
				return true;
			}else{
				return false;	
			}
		}
		if(3 <= G.size()){
			Collections.sort(G);
			if(numSearch(G)){
				return true;
			}else{
				return false;	
			}
		}
		if(3 <= B.size()){
			Collections.sort(B);
			if(numSearch(B)){
				return true;
			}else{
				return false;	
			}
		}
		
		return true;
	}

	private static boolean numSearch(ArrayList<Integer> num) {
		int i = 0;
		if((num.get(i) + 1) == num.get(i+1) &&(num.get(i+1) + 1) == num.get(i+2)){
			return true;
		}else{
			return false;
		}
	}

	
}

Compiler output:
Main.java:8: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;


public class main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		String str;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int turn = Integer.parseInt(br.readLine());
		for(int i = 0; i < turn; i++){
			str = br.readLine();
			String[] num = str.split(" ");
			str = br.readLine();
			String[] rgb = str.split(" ");
			if(rgbDivide(num, rgb)){
				System.out.println("1");
			}else{
				System.out.println("0");
			}
		}
	}
	
	static boolean rgbDivide(String[] num, String[] rgb){
		ArrayList<Integer> R = new ArrayList<Integer>();
		ArrayList<Integer> G = new ArrayList<Integer>();
		ArrayList<Integer> B = new ArrayList<Integer>();
		for(int i = 0; i < num.length; i++){
			if(rgb[i].equals("R")){
				R.add(Integer.parseInt(num[i]));
			}else if(rgb[i].equals("G")){
				G.add(Integer.parseInt(num[i]));
			}else{
				B.add(Integer.parseInt(num[i]));
			}
		}
		if(3 <= R.size()){
			Collections.sort(R);
			if(numSearch(R)){
				return true;
			}else{
				return false;	
			}
		}
		if(3 <= G.size()){
			Collections.sort(G);
			if(numSearch(G)){
				return true;
			}else{
				return false;	
			}
		}
		if(3 <= B.size()){
			Collections.sort(B);
			if(numSearch(B)){
				return true;
			}else{
				return false;	
			}
		}
		
		return true;
	}

	private static boolean numSearch(ArrayList<Integer> num) {
		int i = 0;
		if((num.get(i) + 1) == num.get(i+1) && (num.get(i+1) + 1) == num.get(i+2)){
			return true;
		}else{
			return false;
		}
	}

	
}

Compiler output:
Main.java:8: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		int[] n = new int[9];
		int[] nr = new int[9];
		int[] ng = new int[9];
		int[] nb = new int[9];
		int ir = 0;
		int ig = 0;
		int ib = 0;
		int count = 0;
		char c;
		for(int i = 0; i < t; i++){
			for(int j = 0; j < 9; j++)
				n[j] = sc.nextInt();
			for(int j = 0; j < 9; j++){
				c = sc.next().charAt(0);
				switch(c){
				case 'R':
					nr[ir] = n[j];
					ir++;
					break;
				case 'G':
					ng[ig] = n[j];
					ig++;
					break;
				case 'B':
					nb[ib] = n[j];
					ib++;
					break;
				default:
					System.out.println("Error");
					break;
				}
			}
			sort(nr, ir);
			sort(ng, ig);
			sort(nb, ib);
			count += judge(nr, ir) + judge(ng, ig) + judge(nb, ib);
			System.out.println(count == 3 ? 1 : 0);
		}
	}
	static void sort(int[] n, int m){
		int temp;
		for(int i = 0; i < m-1; i++){
			for(int j = i+1; j < m; j++){
				if(n[i] > n[j]){
					temp = n[i];
					n[i] = n[j];
					n[j] = temp;
				}
			}
		}
	}
	static int judge(int[] n, int m){
		int count = 0;
		for(int i = 0; i < m-2; i++){
			if(n[i] == n[i+1] && n[i+1] == n[i+2]){
				count++;
				i += 2;
			}else if(n[i+2] - n[i+1] == 1 && n[i+1] - n[i] == 1){
				count++;
				i += 2;
			}
		}
		return count;
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package Rummy;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner scan = new Scanner(System.in);
		int T = Integer.parseInt(scan.nextLine());
		String str = "";
		for (int i = 0; i < T; i++) {
			str = scan.nextLine();
			String[] num = str.split(" ");
			str = scan.nextLine();
			String[] rgb = str.split(" ");
			sort(num, rgb);
		}
	}

	private static void sort(String[] num, String[] rgb) {
		ArrayList<Integer> R = new ArrayList<Integer>();
		ArrayList<Integer> G = new ArrayList<Integer>();
		ArrayList<Integer> B = new ArrayList<Integer>();
		String ans = "";
		for(int i = 0; i < num.length; i++){
			if(rgb[i].equals("R")){
				R.add(Integer.parseInt(num[i]));
			}else if(rgb[i].equals("G")){
				G.add(Integer.parseInt(num[i]));
			}else{
				B.add(Integer.parseInt(num[i]));
			}
		}

		if(R.size()%3 != 0 || G.size()%3 != 0 || B.size()%3 != 0){
			System.out.println("0");
			return;
		}

		if(3 <= R.size()){
			Collections.sort(R);
			if(numSearch(R)){
				System.out.println("1");
				return;
			}
		}
		if(3 <= G.size()){
			Collections.sort(G);
			if(numSearch(G)){
				System.out.println("1");
				return;
			}
		}
		if(3 <= B.size()){
			Collections.sort(B);
			if(numSearch(B)){
				System.out.println("1");
				return;
			}else{
				System.out.println("0");
				return;
			}
		}else{
			System.out.println("0");
			return;
		}
	}


	private static boolean numSearch(ArrayList<Integer> r) {
		int i = 0;
		switch(r.size()){
		case 3:
			if( r.get(0) == r.get(1) && r.get(0) == r.get(2) ) return true;
			if( r.get(0) == r.get(1)-1 && r.get(0) == r.get(2)-2 ) return true;
			break;

		case 6:
			if( r.get(0) == r.get(1) && r.get(0) == r.get(2) ) i++;
			if( r.get(0) == r.get(1)-1 && r.get(0) == r.get(2)-2 ) i++;
			if( r.get(3) == r.get(4) && r.get(3) == r.get(5) ) i++;
			if( r.get(3) == r.get(4)-1 && r.get(3) == r.get(5)-2 ) i++;
			if(i == 2) return true;
			break;

		case 9:
			if( r.get(0) == r.get(1) && r.get(0) == r.get(2) ) i++;
			if( r.get(0) == r.get(1)-1 && r.get(0) == r.get(2)-2 ) i++;
			if( r.get(3) == r.get(4) && r.get(3) == r.get(5) ) i++;
			if( r.get(3) == r.get(4)-1 && r.get(3) == r.get(5)-2 ) i++;
			if( r.get(6) == r.get(7) && r.get(6) == r.get(8) ) i++;
			if( r.get(6) == r.get(7)-1 && r.get(6) == r.get(8)-2 ) i++;
			if(i == 3) return true;
			break;

		}


		}
		return false;
	}

}

Compiler output:
Main.java:101: error: illegal start of type
		return false;
		^
Main.java:104: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

//Rummy
public class main {

	int[] a, c;
	int[][] as;
	char[] s;
	
	boolean dfs(int k){
		if(k==9){
			for(int i=0;i<3;i++)if(s[as[i][0]]!=s[as[i][1]]||s[as[i][1]]!=s[as[i][2]])return false;
			for(int i=0;i<3;i++){
				int[] t = new int[3];
				for(int j=0;j<3;j++)t[j]=a[as[i][j]];
				Arrays.sort(t);
				if(!(t[0]==t[1]&&t[1]==t[2]||t[0]+1==t[1]&&t[1]+1==t[2]))return false;
			}
			return true;
		}
		for(int i=0;i<3;i++){
			if(c[i]==3)continue;
			as[i][c[i]] = k;
			c[i]++;
			if(dfs(k+1))return true;
			c[i]--;
		}
		return false;
	}
	
	void run(){
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		while(T--!=0){
			a = new int[9]; s = new char[9]; c = new int[3];
			for(int i=0;i<9;i++)a[i]=sc.nextInt();
			for(int i=0;i<9;i++)s[i]=sc.next().charAt(0);
			as = new int[3][3];
			System.out.println(dfs(0)?1:0);
		}
	}
	
	public static void main(String[] args) {
		new AOJ2102().run();
	}
}

Compiler output:
Main.java:5: error: class main is public, should be declared in a file named main.java
public class main {
       ^
Main.java:45: error: cannot find symbol
		new AOJ2102().run();
		    ^
  symbol:   class AOJ2102
  location: class main
2 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

//Rummy
public class Main {

	int[] a, c;
	int[][] as;
	char[] s;
	
	boolean dfs(int k){
		if(k==9){
			for(int i=0;i<3;i++)if(s[as[i][0]]!=s[as[i][1]]||s[as[i][1]]!=s[as[i][2]])return false;
			for(int i=0;i<3;i++){
				int[] t = new int[3];
				for(int j=0;j<3;j++)t[j]=a[as[i][j]];
				Arrays.sort(t);
				if(!(t[0]==t[1]&&t[1]==t[2]||t[0]+1==t[1]&&t[1]+1==t[2]))return false;
			}
			return true;
		}
		for(int i=0;i<3;i++){
			if(c[i]==3)continue;
			as[i][c[i]] = k;
			c[i]++;
			if(dfs(k+1))return true;
			c[i]--;
		}
		return false;
	}
	
	void run(){
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		while(T--!=0){
			a = new int[9]; s = new char[9]; c = new int[3];
			for(int i=0;i<9;i++)a[i]=sc.nextInt();
			for(int i=0;i<9;i++)s[i]=sc.next().charAt(0);
			as = new int[3][3];
			System.out.println(dfs(0)?1:0);
		}
	}
	
	public static void main(String[] args) {
		new AOJ2102().run();
	}
}

Compiler output:
Main.java:45: error: cannot find symbol
		new AOJ2102().run();
		    ^
  symbol:   class AOJ2102
  location: class Main
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	//?????°
	private static int valueOfCard = 9; //?????????????????°
	private static int numberOfCard = 9; //?????????????????????????¨??????°(1???9 = 9)
	private static int colorOfCard = 3; //??????????????????????¨??????°(RGB = 3)
	private static int winSetCount = 3; //???????????????????????¢?????°

	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		//??\????????°?????????
		int intLoop = scan.nextInt();
		//????¨?????´???´????¢????
		ArrayList<Integer> ansList = new ArrayList<Integer>();
		ArrayList<Card> cards = new ArrayList<Card>();

		//??\?????????
		for(int i = 0; i < intLoop; i++){

			for(int j = 0; j < valueOfCard; j++){
				Card card = new Card();
				card.setNumber(scan.nextInt());
				cards.add(card);
			}
			for(int j = 0; j < valueOfCard; j++){
				Card card = cards.get(j + i * valueOfCard);
				card.setColor(scan.next());
				cards.set(j, card);
			}
		}
		scan.close();
/*for(Card c : cards){
	System.out.println(c.getNumber() + " : " + c.getColor());
}*/
		for(int i = 0; i < intLoop; i++){
			int setCount = 0; //??¢????????°
			int[][] arrayRGB = new int[colorOfCard][numberOfCard];
			//RGB???????????\?????????
			for(int j = 0; j < valueOfCard; j++){
				Card card = cards.get(j + i * valueOfCard);
				String color = card.getColor();
				if("R".equals(color)){
					arrayRGB[0][card.getNumber() - 1]++;
				}else if("G".equals(color)){
					arrayRGB[1][card.getNumber() - 1]++;
				}else if("B".equals(color)){
					arrayRGB[2][card.getNumber() - 1]++;
				}
			}
			/*for(int t = 0; t < colorOfCard; t++){
				for(int u = 0; u < numberOfCard; u++){
					System.out.print(arrayRGB[t][u] + " ");
				}
				System.out.println();
			}
			System.out.println();*/
			for(int j = 0; j < colorOfCard; j++){
				for(int k = 0; k < valueOfCard - 2; k++){
					boolean isReplay = false;
					if(arrayRGB[j][k] != 0 && arrayRGB[j][k+1] != 0 && arrayRGB[j][k+2] !=0){
						arrayRGB[j][k]--;
						arrayRGB[j][k+1]--;
						arrayRGB[j][k+2]--;
						setCount++;
						isReplay = true;
					}
					if(isReplay && arrayRGB[j][k] != 0){
						k--;
					}
				}
							}
			for(int j = 0; j < colorOfCard; j++){
				for(int k = 0; k < valueOfCard; k++){
					if(arrayRGB[j][k] == winSetCount){
						setCount++;
						arrayRGB[j][k] -= winSetCount;
					}
				}
			}
			if(setCount == winSetCount){
				ansList.add(1);
			}else{
				ansList.add(0);
			}

		}

		//??????
		for(int i = 0; i < ansList.size(); i++){
			System.out.println(ansList.get(i));
		}
	}
}
public class Card {
	private int number;
	private String color;

	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}

}

Compiler output:
Main.java:96: error: class Card is public, should be declared in a file named Card.java
public class Card {
       ^
1 error
Language: Java

import java.io.*;
import java.util.Scanner;
import java.util.Arrays;
public class a{
    public static void Main(String[] args){
        Scanner sc= new Scanner(System.in);
        int t=sc.nextInt();
        for (int i=0;i<t;i++){
            int win=1;
            int color[][]=new int[3][9];
            for (int j=0;j<3;j++) Arrays.fill(color[j],10);
            int num[]=new int[9];
            for (int j=0;j<9;j++) num[j]=sc.nextInt();
            int color_num[]=new int[3];
            for (int j=0;j<9;j++){
                char c=sc.next().charAt(0);
                if (c=='R') color[0][color_num[0]++]=num[j];
                if (c=='G') color[1][color_num[1]++]=num[j];
                if (c=='B') color[2][color_num[2]++]=num[j];
            }
            for (int j=0;j<3;j++) Arrays.sort(color[j]);
            if (color_num[0]%3!=0||color_num[1]%3!=0||color_num[2]%3!=0) win=0;
            for (int j=0;j<3&&win!=0;j++){
                for (int k=0;k<color_num[j]/3;k++){
                    if (color[j][k*3]==color[j][k*3+2]){
                        color[j][k*3]=0;
                        color[j][k*3+1]=0;
                        color[j][k*3+2]=0;
                    }
                }
            }
for (int j=0;j<3&&win!=0;j++){
                int n=color_num[j];
                int changed=0;
                for (int l=0;l<n/3;l++){
                    int bef=-2;
                    changed=0;
                    for (int k=0;k<color_num[j];k++){
                        int now=color[j][k];
                        if ((now!=0&&changed==0)||now==bef+1){
                            color[j][k]=0;
                            changed++;
                            bef=now;
                        }
                        if (changed==3){
                            changed=0;
                            bef=-2;
                        }
                    }
                }
                if (changed!=0) win=0;
            }

            for (int j=0;j<3;j++){
                for (int k=0;k<color_num[j];k++){
                    if (color[j][k]!=0) win=0;
                }
            }

            System.out.println(win);
        }
    }
}

Compiler output:
Main.java:4: error: class a is public, should be declared in a file named a.java
public class a{
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

import static java.lang.Integer.parseInt;

/**
 * Rummy
 */
public class Main {


	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;

		int T = parseInt(br.readLine());

		for (int i = 0; i < T; i++) {

			StringTokenizer st1 = new StringTokenizer(br.readLine());
			StringTokenizer st2 = new StringTokenizer(br.readLine());

			int[] R = new int[10];
			int[] G = new int[10];
			int[] B = new int[10];

			for (int j = 0; j < 9; j++) {
				int n = parseInt(st1.nextToken());
				switch (st2.nextToken().charAt(0)) {
					case 'R':
						R[n]++;
						break;
					case 'G':
						G[n]++;
						break;
					case 'B':
						B[n]++;
						break;
				}
			}

			//
			int count = solve(R, 1, 0) + solve(G, 1, 0) + solve(B, 1, 0);
			System.out.println(count >= 3 ? 1 : 0);
		}
	}

	public static int solve(int[] cards, int s, int c) {

		if (s == 10) return c;

		int c1 = 0, c2 = 0, c3 = 0;

		if (cards[s] >= 3) {
			int[] _cards = cards.clone()
			_cards[s] -= 3;
			c1 = solve(_cards, s + 1, c + 1);
		}

		if (s <= 7 && cards[s] >= 1 && cards[s + 1] >= 1 && cards[s + 2] >= 1) {
			int[] _cards = cards.clone()
			_cards[s]--;
			_cards[s + 1]--;
			_cards[s + 2]--;
			if (_cards[s] >= 1) {
				c2 = solve(_cards, s, c + 1);
			} else {
				c2 = solve(_cards, s + 1, c + 1);
			}
		}

		c3 = solve(cards, s + 1, c);

		return Math.max(c1, Math.max(c2, c3));
	}
}

Compiler output:
Main.java:58: error: ';' expected
			int[] _cards = cards.clone()
			                            ^
Main.java:64: error: ';' expected
			int[] _cards = cards.clone()
			                            ^
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class Main implements Comparator<Main> {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = Integer.parseInt(sc.nextLine()) ;

		while (sc.hasNextLine()){

			String[] nums = sc.nextLine().split(" ");
			String[] colors = sc.nextLine().split(" ");

			ArrayList<Main> tehuda = new ArrayList<Main>();

			for(int j = 0;j < nums.length; j++ ) {
				Main card = new Main(Integer.parseInt(nums[j]), colors[j]);
				tehuda.add(card);
			}
			Collections.sort(tehuda, new Main());


			ArrayList<Integer> cardSet = new ArrayList<Integer>();
			ArrayList<ArrayList<Integer>> cSetList = new ArrayList<ArrayList<Integer>>();


			String checkColor = tehuda.get(0).getColor();
			cardSet.add(tehuda.get(0).getNum());
			for(int j = 1;j < tehuda.size();j++) {
				if(!(tehuda.get(j).getColor().equals(checkColor))) {
					cSetList.add(cardSet);
					cardSet = new ArrayList<Integer>();
					checkColor = tehuda.get(j).getColor();
				}

				cardSet.add(tehuda.get(j).getNum());
				if(j == tehuda.size() - 1) {
					cSetList.add(cardSet);
				}


			}

			int point = 0;


			for(int j = 0;j < cSetList.size(); j++) {
				for(int y = 0;y < cSetList.get(j).size() -2;y++){
					int num1 = cSetList.get(j).get(y);
					int num2 = cSetList.get(j).get(y + 1);
					int num3 = cSetList.get(j).get(y + 2);
					if((num1 + 1 == num2 && num1 + 2 == num3 ) || (num1 == num2 && num1 == num3)) {
						point++;
						y += 2;
					}
				}
				for(int y = 0;y < cSetList.get(j).size() -4;y++){
					int num1 = cSetList.get(j).get(y);
					int num2 = cSetList.get(j).get(y + 2);
					int num3 = cSetList.get(j).get(y + 4);
					if((num1 + 1 == num2 && num1 + 2 == num3 )) {
						point++;
					}
				}


			}
			if(point == 3) {
				System.out.println("1");
			} else {
				System.out.println("0");
			}
		}
		sc.close();

	}

	private int num;
	private String color;

	//??????????????????????????????
	Main (int num, String color) {
		this.num = num;
		this.color = color;
	}

	Main() {
	}

	public int getNum() {
		return this.num;
	}

	public String getColor () {
		return this.color;
	}

	@Override
	public  int compare(Main card1 ,Main card2) {
		int num1 = card1.getNum();
		int num2 = card2.getNum();
		String color1 = card1.getColor();
		String color2 = card2.getColor();

		if(color1.compareTo(color2) > 0 && num1 > num2) {
			return 2;
		} else if (color1.compareTo(color2) > 0) {
			return 1;
		} else if (color1.compareTo(color2) == 0 && num1 > num2) {
			return 0;
		} else if (color1.compareTo(color2) == 0 ) {
			return -1;
		} else if (color1.compareTo(color2) < 0 && num1 > num2) {
			return -2;
		} else {
			return -3;
		}

	}

Compiler output:
Main.java:121: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;
import java.io.*;

class Set{
    int num=0;
    int color=0; 

    boolean checkNum(Set num1, Set num2, Set num3){
        int i,j;
        i = num3.num - num2.num;
        j = num2.num - num1.num;
        if(((i == 1) && (j == 1)) || ((i == 0) && (j == 0))){
            return true;
        }else{
            return false;
        }
    }

    boolean sameColor(Set cl1, Set cl2, Set cl3){
        if((cl1.color == cl2.color) && (cl2.color == cl3.color)){
            return true;
        }else{
            return false;
        }
    }
} //end_of_Set

class DataComparator implements java.util.Comparator<Set>{
    public int compare(Set o1, Set o2){
        if(o1.color == o2.color){
            return o1.num - o2.num;
        }else{
            return o1.color - o2.color;
        }
    }
}

public class Rummy2{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt(); //number_of_data-set
    Set[] card = new Set[9];

    for(int i=0;i<n;i++){
      for(int j=0;j<9;j++){ //input_numbers
        card[j] = new Set();
        card[j].num = sc.nextInt();
      }
      sc.nextLine();
      String line = sc.nextLine();
      String[] ch= line.split(" ");
      for(int l=0;l<9;l++){  //check_color
        switch(ch[l]){
          case "R": card[l].color = 1;
                    break;
          case "G": card[l].color = 2;
                    break;
          case "B": card[l].color = 3;
                    break;
          default : break;
        }
      }
      Arrays.sort(card, new DataComparator());

/*    sort degug
      for(int k=0;k<9;k++){
          System.out.print(card[k].num + " ");
      }
      System.out.println();
      for(int k=0;k<9;k++){
          System.out.print(card[k].color + " ");
      }
      System.out.println();
*/

      Set check1 = new Set();
      Set check2 = new Set();
      Set check3 = new Set();

      if(check1.sameColor(card[0],card[1],card[2])){
          if(check1.checkNum(card[0],card[1],card[2])){
          }else{
             System.out.println(0);
             continue;
          }
      }
      else{
        System.out.println(0);
        continue;
      }
      
      if(check2.sameColor(card[3],card[4],card[5])){
          if(check2.checkNum(card[3],card[4],card[5])){
          }else{
             System.out.println(0);
             continue;
          }
      }
      else{
        System.out.println(0);
        continue;
      }

      if(check3.sameColor(card[6],card[7],card[8])){
          if(check3.checkNum(card[6],card[7],card[8])){
          }else{
             System.out.println(0);
             continue;
          }
      }
      else{
        System.out.println(0);
        continue;
      }

    System.out.println(1);
    }//end_of_while
  }//end_of_main
}//end_of_Rummy

Compiler output:
Main.java:38: error: class Rummy2 is public, should be declared in a file named Rummy2.java
public class Rummy2{
       ^
1 error
Language: Java

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class rummy {

	public static void main(String[] args) {

		//?????£?????????
		int output;
		int okCount;
		int loop;
		String line;
		Card[] cardList = new Card[9];

		Scanner sc = null;

		try {
			sc = new Scanner(System.in);

			//?????§???????????°???????????????
			loop = sc.nextInt();
			//?¬???????????§????
			line = sc.nextLine();

			for (int i = 0; i < loop; i++) {
				//?????????????????????
				line = sc.nextLine();
				String[] work = line.split(" ");

				int[] number = new int[work.length];
				for (int j = 0; j < work.length; j++) {
					number[j] = Integer.parseInt(work[j]);
				}

				line = sc.nextLine();
				String[] color = line.split(" ");

				//???????????????
				for (int j = 0; j < cardList.length; j++) {
					cardList[j] = new Card(number[j], color[j]);
				}

				//?????????????????°?????§?????????
				Arrays.sort(cardList , new Comparator<Card>() {

					@Override
					public int compare(Card card1, Card card2) {

						int temp = card1.getColor().compareTo(card2.getColor());

						if (temp == 0) {
							return card1.getNumber() - card2.getNumber();
						}
						return temp;
					}
				});

				//???????????¶????????????????????????????????§??????
				okCount = 0;
				output = 0;
				//??¨?????????????????§???????????¨
				for (int j = 0; j < 3; j++) {
					if (cardList[j* 3].getColor().equals(cardList[j*3 + 1].getColor())) {
						if (cardList[j* 3].getColor().equals(cardList[j*3 + 2].getColor())) {
							//??£?????§???????????¨
							if (cardList[j*3].getNumber() + 1 == cardList[j*3 + 1].getNumber()){

								if (cardList[j*3 + 1].getNumber() + 1 == cardList[j*3 + 2].getNumber()){
									okCount++;

								}
								//?????????????????°?????§???????????¨
							}else if (cardList[j*3].getNumber() == cardList[j*3 + 1].getNumber()) {
									if (cardList[j*3 + 1].getNumber() == cardList[j*3 + 2].getNumber()) {
										okCount++;
									}
							}
						}
					}
				}
				if (okCount == 3) {
					output = 1;
				}
				//???????¢??????¨
				System.out.println(output);
			}
		} finally {
			sc.close();
		}

	}

	//??????????????????
	static class Card {
		//?????£?????????
		//??????????????°???
		private int number;
		//???????????????
		private String color;

		//?????????????????????
		public  Card(int num, String color){
			this.number = num;
			this.color = color;
		}

		//????????????????????????
		public int getNumber() {
			return number;
		}

		public void setNumber(int number) {
			this.number = number;
		}

		public String getColor() {
			return color;
		}

		public void setColor(String color) {
			this.color = color;
		}

	}
}

Compiler output:
Main.java:5: error: class rummy is public, should be declared in a file named rummy.java
public class rummy {
       ^
1 error