Submission #158944


Source Code Expand

Copy
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// 入力の読み込み
		Scanner sc = new Scanner(System.in);
		int[][] grid = new int [4][4]; 
		for (int row = 0; row < 4; row++) {
			for (int col = 0; col < 4; col++) {
				grid[row][col] = sc.nextInt();
			}
		}
		sc.close();
		
		// 左か下に同じ数があれば、続行可能。
		String result = "GAMEOVER";
		for (int row = 0; row < 3; row++) {
			for (int col = 0; col < 3; col++) {
				if (grid[row][col] == grid[row][col+1] || grid[row][col] == grid[row+1][col]) {
					result = "CONTINUE"; 
					break; 
				}
			}
		}
		
		// 出力
		System.out.println(result);

	}


}

Submission Info

Submission Time
Task A - DEAD END
User seotch
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 717 Byte
Status
Exec Time 496 ms
Memory 23076 KB

Judge Result

Set Name Score / Max Score Test Cases
All 0 / 100 hand_1.txt, hand_2.txt, random_1.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_2.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, random_27.txt, random_28.txt, random_29.txt, random_3.txt, random_30.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt
Case Name Status Exec Time Memory
hand_1.txt 496 ms 23076 KB
hand_2.txt 452 ms 22828 KB
random_1.txt 465 ms 22928 KB
random_10.txt 459 ms 22956 KB
random_11.txt 468 ms 22952 KB
random_12.txt 454 ms 22952 KB
random_13.txt 456 ms 22952 KB
random_14.txt 468 ms 22944 KB
random_15.txt 470 ms 22960 KB
random_16.txt 460 ms 22948 KB
random_17.txt 457 ms 22952 KB
random_18.txt 475 ms 22956 KB
random_19.txt 465 ms 22956 KB
random_2.txt 477 ms 22824 KB
random_20.txt 475 ms 22912 KB
random_21.txt 488 ms 22944 KB
random_22.txt 464 ms 22956 KB
random_23.txt 463 ms 22820 KB
random_24.txt 452 ms 22952 KB
random_25.txt 483 ms 22952 KB
random_26.txt 491 ms 22832 KB
random_27.txt 461 ms 22956 KB
random_28.txt 472 ms 22956 KB
random_29.txt 491 ms 22960 KB
random_3.txt 472 ms 22956 KB
random_30.txt 465 ms 22952 KB
random_4.txt 481 ms 22844 KB
random_5.txt 460 ms 22824 KB
random_6.txt 465 ms 22832 KB
random_7.txt 466 ms 22964 KB
random_8.txt 454 ms 22948 KB
random_9.txt 456 ms 22944 KB
sample_1.txt 466 ms 22944 KB
sample_2.txt 469 ms 23036 KB
sample_3.txt 478 ms 22952 KB