Submission #19483039


Source Code Expand

Copy
import java.util.Scanner;

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

    public void main(Scanner sc) {
        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 b = d % 2;
        int ans = 0;
        for (int i = 0; i < r; i++) {
            for (int j = 0; j < c; j++) {
                if ((i + j) % 2 == b && (i + j) <= d) {
                    ans = Math.max(ans, data[i][j]);
                }
            }
        }
        System.out.println(ans);
    }
}

Submission Info

Submission Time
Task B - 謎の人物X
User minorin
Language Java (OpenJDK 11.0.6)
Score 100
Code Size 831 Byte
Status AC
Exec Time 828 ms
Memory 63268 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 60 / 60 40 / 40
Status
AC × 3
AC × 18
AC × 33
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 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_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 121 ms 35536 KB
sample_02.txt AC 106 ms 35336 KB
sample_03.txt AC 116 ms 35432 KB
subtask1_01.txt AC 107 ms 35300 KB
subtask1_02.txt AC 119 ms 35592 KB
subtask1_03.txt AC 122 ms 35984 KB
subtask1_04.txt AC 193 ms 45592 KB
subtask1_05.txt AC 131 ms 36160 KB
subtask1_06.txt AC 178 ms 40124 KB
subtask1_07.txt AC 190 ms 44792 KB
subtask1_08.txt AC 203 ms 45808 KB
subtask1_09.txt AC 197 ms 46192 KB
subtask1_10.txt AC 205 ms 46160 KB
subtask1_11.txt AC 205 ms 46176 KB
subtask1_12.txt AC 208 ms 45904 KB
subtask1_13.txt AC 214 ms 46336 KB
subtask1_14.txt AC 195 ms 46092 KB
subtask1_15.txt AC 197 ms 46216 KB
subtask2_01.txt AC 158 ms 39256 KB
subtask2_02.txt AC 159 ms 39224 KB
subtask2_03.txt AC 527 ms 59048 KB
subtask2_04.txt AC 181 ms 42296 KB
subtask2_05.txt AC 290 ms 55692 KB
subtask2_06.txt AC 446 ms 59144 KB
subtask2_07.txt AC 690 ms 62220 KB
subtask2_08.txt AC 769 ms 61708 KB
subtask2_09.txt AC 791 ms 61588 KB
subtask2_10.txt AC 794 ms 61604 KB
subtask2_11.txt AC 746 ms 61664 KB
subtask2_12.txt AC 770 ms 61544 KB
subtask2_13.txt AC 818 ms 63196 KB
subtask2_14.txt AC 828 ms 63268 KB
subtask2_15.txt AC 816 ms 63124 KB