Exemplo n.º 1
0
 public static void readIntMatrix(InputReader in, int[][] matrix) {
   for (int i = 0; i < matrix.length; i++) {
     for (int j = 0; j < matrix[i].length; j++) {
       matrix[i][j] = in.nextInt();
     }
   }
 }
Exemplo n.º 2
0
 public static void readIntArrays(InputReader in, int[]... arrays) {
   for (int i = 0; i < arrays[0].length; i++) {
     for (int j = 0; j < arrays.length; j++) {
       arrays[j][i] = in.nextInt();
     }
   }
 }
Exemplo n.º 3
0
 public static void readCharMatrix(InputReader in, char[][] matrix) {
   for (int i = 0; i < matrix.length; i++) {
     String row = in.next();
     for (int j = 0; j < matrix[i].length; j++) {
       matrix[i][j] = row.charAt(j);
     }
   }
 }