Пример #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();
     }
   }
 }
Пример #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();
     }
   }
 }
Пример #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);
     }
   }
 }