Submission #172187
Source Code Expand
Copy
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package javaapplication5; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * * @author Ryota */ public class JavaApplication5 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // TODO code application logic here int sisetu[][] = new int[1000][1000]; String foo[] = new String[1000]; int max = 0; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); String[] str2 = new String[3]; str2 = str.split(" ", 3); int R,C,D; R = Integer.parseInt(str2[0]); C = Integer.parseInt(str2[1]); D = Integer.parseInt(str2[2]); //マップ生成 for(int i = 0; i < R ; i++){ str = br.readLine(); foo = str.split(" ",C); for(int j = 0; j < C ; j++){ sisetu[i][j] = Integer.parseInt(foo[j]); } } //捜査 for(int i = 0; i <= D ; i++){ for(int j = 0; j <= D; j++){ if(D%2 == (i+j)%2){ if(max < sisetu[i][j]){ max = sisetu[i][j]; } } } } System.out.println(max); } }
Submission Info
Submission Time | |
---|---|
Task | B - 謎の人物X |
User | shobonara |
Language | Java (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 1734 Byte |
Status | CE |
Compile Error
./Main.java:17: error: class JavaApplication5 is public, should be declared in a file named JavaApplication5.java public class JavaApplication5 { ^ 1 error