/* NAME : Michael Orwin SCHOOL : Kalamazoo AMSC DIVISION : Junior PROGRAM : GridFit ROUND : 3 LANGUAGE : Java */ import java.io.*; import java.lang.*; import java.util.*; public class GridFit { public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in); ArrayList solidCells = new ArrayList(); System.out.println("Input Solid Cells:"); String line = in.nextLine(); Scanner lineScan = new Scanner(line); lineScan.useDelimiter(",\\s"); lineScan.nextInt(); while (lineScan.hasNextInt()) { int solidCell = lineScan.nextInt(); solidCells.add(solidCell); } for (int solidCell : solidCells) { //System.out.println("solidCells: " + solidCell); } ArrayList grid = new ArrayList(); for (int i = 1; i<26; i++) { grid.add(i); } for (int i = 0; i=grid.size())) { counter++; System.out.println("NONE"); } } } else if (numPattern == 2) { int counter = 0; for (int j=0; counter<2; j++) { counter = 0; if (j=grid.size())) { counter++; counter++; System.out.println("NONE"); } } } else { int counter = 0; for (int j=0; counter<2; j++) { counter = 0; if ((j+1)%5 == 0) { j++; } if (j=grid.size())) { counter++; counter++; System.out.println("NONE"); } } } System.out.println(""); } }