Language: Java

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

public class Rummy {
	
	public static void main(String[] args) {
		
		
		
		// ??\??????????????°??????????´???¨
		int intHairetsuNum[] = new int[9]; 
		String strHairetsuNum[] = new String[9];
		
		// ??\??????????????????????´???¨
		String strHairetsuColor[] = new String[9];
		
		// ???????????¨??? ArrayList ?????¨?????????
		ArrayList<Integer> arrayRed = new ArrayList<Integer>();
		ArrayList<Integer> arrayGreen = new ArrayList<Integer>();
		ArrayList<Integer> arrayBlue = new ArrayList<Integer>();
		
		// ???????????????????????????
		boolean isRed = false;
		boolean isGreen = false;
		boolean isBlue = false;
		
		// ???????????????
		int intResult = 0;
		
		// ???????????¨??¨ ArrayList
		ArrayList<Integer> arrayResult = new ArrayList<Integer>();
		
		InputStreamReader isrNum = new InputStreamReader(System.in);
		BufferedReader bfNum = new BufferedReader(isrNum);
		
		try {
			
			String strDataSetNum = bfNum.readLine();
			int intDataSetNum = Integer.parseInt(strDataSetNum);
			
			// ???????????????????????°???10????????§??¨??????
			int intSaidai = 10;
			if (intDataSetNum <= intSaidai) {
				
				// ??\???????????????????????????????????°????????°???????????????
				for (int i = 0; i < intDataSetNum; i++) {
				
					// ????????\??????????????°????????????
					String strNineNum = bfNum.readLine();
					
					// ??\??????????????°???????????¨???????????°???????????°?????¨?????????????´?
					strHairetsuNum = strNineNum.split(" ");
					
					// String???????????§????????? int??????????????????????´?
					for (int j = 0; j < strHairetsuNum.length; j++) {
						intHairetsuNum[j] = Integer.parseInt(strHairetsuNum[j]);
					}
					
					// ????????\???????????????(???????????????)?????????
					String strNineColor = bfNum.readLine();
					
					// ??\???????????????????????¨???????????°??????????????¨?????????????´?
					strHairetsuColor = strNineColor.split(" ");
					
					// ??????????????????????????? ArrayList ???????´?
					for (int k = 0; k < 9; k++) {
						
						// ??????????????¨ ArrayList???
						if (strHairetsuColor[k].equals("R")) {
							arrayRed.add(intHairetsuNum[k]);
							
						// ??????????????¨ ArrayList???
						} else if (strHairetsuColor[k].equals("G")) {
							arrayGreen.add(intHairetsuNum[k]);
						
						// ??????????????¨ ArrayList???
						} else {
							arrayBlue.add(intHairetsuNum[k]);
						}
						
						
						
					}
					isRed = getResult(arrayRed);
					isGreen = getResult(arrayGreen);
					isBlue = getResult(arrayBlue);
					
					if (isRed) {
						if (isGreen) {
							if (isBlue) {
								intResult = 1;
							}
						}
					}
					
					// ????????? ArrayList ???????´?
					arrayResult.add(intResult);
					
					// ?????????????????????????????????
					intResult = 0;
				}
				
			} else {
				System.out.println("???????????????????????°???10????????§??¨?????????");
			}
			
		} catch (IOException e) {
			System.out.println(e);
			
		} catch (NumberFormatException e) {
			System.out.println("??°????????\?????????????????????");
		
		}
		
		for (int i = 0; i < arrayResult.size(); i++) {
			System.out.println(arrayResult.get(i));
		}
		
	}
	
	// ????????????????????????????????????
	public static boolean getResult(ArrayList array) {
		
		// ?????°???????????°????¨???¶??????????????????
		int intHairetsuResult[] = new int[9]; 
		
		// ?????°???????????°????¨????
		int intOne = 0;
		int intTwo = 0;
		int intThree = 0;
		int intFour = 0;
		int intFive = 0;
		int intSix = 0;
		int intSeven = 0;
		int intEight = 0;
		int intNine = 0;
		
		// ??????????????°??????????´????????????°
		int intIchiji = 0;
		
		// ???????????????????´????????????°
		boolean isResult = false;
		
		for (int m = 0; m < array.size(); m++) {
			
			if (array.get(m).equals(1)) {
				intOne++;
			} else if (array.get(m).equals(2)) {
				intTwo++;
			} else if (array.get(m).equals(3)) {
				intThree++;
			} else if (array.get(m).equals(4)) {
				intFour++;
			} else if (array.get(m).equals(5)) {
				intFive++;
			} else if (array.get(m).equals(6)) {
				intSix++;
			} else if (array.get(m).equals(7)) {
				intSeven++;
			} else if (array.get(m).equals(8)) {
				intEight++;
			} else if (array.get(m).equals(9)) {
				intNine++;
			}
			
		}
		
		// ??¨???????????????????????°???????????°????¨????
		intHairetsuResult[0] = intOne;
		intHairetsuResult[1] = intTwo;
		intHairetsuResult[2] = intThree;
		intHairetsuResult[3] = intFour;
		intHairetsuResult[4] = intFive;
		intHairetsuResult[5] = intSix;
		intHairetsuResult[6] = intSeven;
		intHairetsuResult[7] = intEight;
		intHairetsuResult[8] = intNine;
		
		// ??????
		// 4???????????¨??????????????°?????? -4 ??????????¬???¨2???????????°?????????????????? -1
		for (int n = 0; n <= 6; n++) {
			if (intHairetsuResult[n] == 4) {
				intIchiji = intHairetsuResult[n];
				intHairetsuResult[n] = intIchiji - 4;
				intIchiji = intHairetsuResult[n + 1];
				intHairetsuResult[n + 1] = intIchiji - 1;
				intIchiji = intHairetsuResult[n + 2];
				intHairetsuResult[n + 2] = intIchiji - 1;
				
			}
			// 3????????¨??????????????°?????? -3
			if (intHairetsuResult[n] == 3) {
				intIchiji = intHairetsuResult[n];
				intHairetsuResult[n] = intIchiji - 3;
			}
			// 2????????¨??????????????°?????¨???????¬???¨2???????????°?????? -1
			if (intHairetsuResult[n] == 2) {
				intIchiji = intHairetsuResult[n];
				intHairetsuResult[n] = intIchiji - 1;
				intIchiji = intHairetsuResult[n + 1];
				intHairetsuResult[n + 1] = intIchiji - 1;
				intIchiji = intHairetsuResult[n + 2];
				intHairetsuResult[n + 2] = intIchiji - 1;
			}
			// 1????????¨??????????????°?????¨???????¬???¨2???????????°?????? -1
			if (intHairetsuResult[n] == 1) {
				intIchiji = intHairetsuResult[n];
				intHairetsuResult[n] = intIchiji - 1;
				intIchiji = intHairetsuResult[n + 1];
				intHairetsuResult[n + 1] = intIchiji - 1;
				intIchiji = intHairetsuResult[n + 2];
				intHairetsuResult[n + 2] = intIchiji - 1;
			}
		}
		
		// 8 ??¨ 9 ?????°??????????????\??????
		if (intHairetsuResult[7] == 3) {
			intIchiji = intHairetsuResult[7];
			intHairetsuResult[7] = intIchiji - 3;
		}
		if (intHairetsuResult[8] == 3) {
			intIchiji = intHairetsuResult[8];
			intHairetsuResult[8] = intIchiji - 3;
		}
		
		// ??¨??¨?????°?????? 0 ?????? true ???????????§???????????? false ?????????
		for (int i = 0; i < intHairetsuResult.length; i++) {
			intIchiji = intHairetsuResult[i];
			if (intIchiji != 0) {
				isResult = false;
				break;
			}
			isResult = true;
		}
		
		return isResult;
	}
}

Compiler output:
Main.java:111: error: illegal escape character
			System.out.println("???????????\?????????????????????");
			                                ^
1 error