Go to diff to previous submission
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package folded; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author cteam028 */ public class Main { /** * @param args the command line arguments */ try { Main fm = new Main(); fm.init(); //Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } } String line; while((line = br.readLine()) != null) { int pole[][][][] = new int[Ar][Ac][(Ar/Tr) + 2][(Ac/Tc) + 2]; for(int x=0; x < Ar; x++) { line = br.readLine(); char[] text = line.toCharArray(); for(int y=0; y < Ac; y++) { boolean inMap = (text[y] == 'X'); if(inMap){ for (int dx = 0; dx < Tr; dx++) { for (int dy = 0; dy < Tc; dy++) { pole[dx][dy][(x + dx)/Tr][(y + dy)/Tc] = 1; } } } } } for (int dx = 0; dx < Tr; dx++) { for (int dy = 0; dy < Tc; dy++) { int pocet = 0; for (int idxx = 0; idxx < (Ar/Tr) + 2; idxx++) { for (int idxy = 0; idxy < (Ac/Tc) + 2; idxy++) { if(pole[dx][dy][idxx][idxy] == 1) pocet++; } } } } } } }
--- c5.s542.cteam028.fm.java.0.Main.java +++ c5.s553.cteam028.fm.java.0.Main.java @@ -25,6 +25,6 @@ Main fm = new Main(); fm.init(); - } catch (IOException ex) { - Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); + } catch (Exception ex) { + //Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } }