Submission #171461


Source Code Expand

Copy
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		new Main().run();
	}

	Scanner sc = new Scanner(System.in);
	void run() {
		int R = sc.nextInt();
		int C = sc.nextInt();
		int D = sc.nextInt();

		int[][] a = new int[R][C];
		for (int i = 0; i < R; i++) {
			for (int j = 0; j < C; j++) {
				a[i][j] = sc.nextInt();
			}
		}

		int ma = 0;
		for (int i = 0; i < R; i++) {
			for (int j = 0; j < C; j++) {
				int d = i + j;
				if (i + j <= D && (i + j) % 2 == D % 2) {
					ma = Math.max(ma, a[i][j]);
				}
			}
		}

		System.out.println(ma);
	}

}

Submission Info

Submission Time
Task B - 謎の人物X
User hs484
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 629 Byte
Status AC
Exec Time 1867 ms
Memory 38388 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 60 / 60 40 / 40
Status
AC × 3
AC × 18
AC × 30
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt
Subtask2 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt
Case Name Status Exec Time Memory
sample_01.txt AC 401 ms 20040 KB
sample_02.txt AC 407 ms 20040 KB
sample_03.txt AC 403 ms 19988 KB
subtask1_01.txt AC 405 ms 20036 KB
subtask1_02.txt AC 428 ms 20812 KB
subtask1_03.txt AC 417 ms 20676 KB
subtask1_04.txt AC 626 ms 29384 KB
subtask1_05.txt AC 444 ms 21060 KB
subtask1_06.txt AC 539 ms 24004 KB
subtask1_07.txt AC 633 ms 28240 KB
subtask1_08.txt AC 635 ms 28892 KB
subtask1_09.txt AC 636 ms 29528 KB
subtask1_10.txt AC 616 ms 29152 KB
subtask1_11.txt AC 649 ms 30856 KB
subtask1_12.txt AC 621 ms 29040 KB
subtask1_13.txt AC 605 ms 28872 KB
subtask1_14.txt AC 611 ms 29456 KB
subtask1_15.txt AC 637 ms 29056 KB
subtask2_01.txt AC 510 ms 22408 KB
subtask2_02.txt AC 506 ms 22340 KB
subtask2_03.txt AC 1006 ms 34704 KB
subtask2_04.txt AC 618 ms 26300 KB
subtask2_05.txt AC 707 ms 34104 KB
subtask2_06.txt AC 836 ms 34944 KB
subtask2_07.txt AC 1707 ms 38040 KB
subtask2_08.txt AC 1834 ms 37864 KB
subtask2_09.txt AC 1842 ms 38212 KB
subtask2_10.txt AC 1769 ms 38388 KB
subtask2_11.txt AC 1767 ms 37792 KB
subtask2_12.txt AC 1867 ms 37952 KB
subtask2_13.txt AC 1734 ms 38204 KB
subtask2_14.txt AC 1806 ms 37960 KB
subtask2_15.txt AC 1865 ms 37676 KB