Submission #172034


Source Code Expand

Copy
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int r = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		int[][] data = new int[r][c];
		for (int i = 0; i < r; i++) {
			for (int j = 0; j < c; j++) {
				data[i][j] = sc.nextInt();
			}
		}

		int max = 0;
		for (int j = r - 1; j >= 0; j --) {
			for (int i = 0; i < c; i++) {
				int jj = j * 2 + d % 2;
				if (jj - i < 0) {
					break;
				}
				if (jj - i >= r) {
					continue;
				}
				if (d < jj) {
					break;
				}
				max = Math.max(data[jj - i][i], max);
			}
		}
		System.out.println(max);
		
		sc.close();
	}
}

Submission Info

Submission Time
Task B - 謎の人物X
User garnacha
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 714 Byte
Status WA
Exec Time 1937 ms
Memory 41440 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 0 / 60 0 / 40
Status
AC × 3
AC × 16
WA × 2
AC × 25
WA × 5
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 470 ms 23216 KB
sample_02.txt AC 473 ms 23220 KB
sample_03.txt AC 466 ms 23216 KB
subtask1_01.txt AC 466 ms 23216 KB
subtask1_02.txt WA 491 ms 23724 KB
subtask1_03.txt AC 503 ms 23732 KB
subtask1_04.txt AC 685 ms 32064 KB
subtask1_05.txt WA 510 ms 24112 KB
subtask1_06.txt AC 636 ms 26688 KB
subtask1_07.txt AC 663 ms 31448 KB
subtask1_08.txt AC 684 ms 32376 KB
subtask1_09.txt AC 680 ms 32824 KB
subtask1_10.txt AC 678 ms 32636 KB
subtask1_11.txt AC 675 ms 32236 KB
subtask1_12.txt AC 666 ms 32116 KB
subtask1_13.txt AC 679 ms 32568 KB
subtask1_14.txt AC 686 ms 32596 KB
subtask1_15.txt AC 696 ms 33040 KB
subtask2_01.txt WA 558 ms 25652 KB
subtask2_02.txt AC 593 ms 25524 KB
subtask2_03.txt AC 1088 ms 38568 KB
subtask2_04.txt WA 653 ms 29512 KB
subtask2_05.txt WA 776 ms 37244 KB
subtask2_06.txt AC 909 ms 37740 KB
subtask2_07.txt AC 1598 ms 41344 KB
subtask2_08.txt AC 1767 ms 41348 KB
subtask2_09.txt AC 1755 ms 41388 KB
subtask2_10.txt AC 1735 ms 40924 KB
subtask2_11.txt AC 1631 ms 41156 KB
subtask2_12.txt AC 1768 ms 41440 KB
subtask2_13.txt AC 1937 ms 41244 KB
subtask2_14.txt AC 1794 ms 40736 KB
subtask2_15.txt AC 1795 ms 41424 KB