import java.lang.*; import java.io.*; import java.util.*; import java.awt.*; public class DivisorAnalysis { public static int[][] strata = new int[268][560]; public static int[][] divisors = new int[215][560]; public static String[] divisorTags = new String[215]; public static String[] strataTags = new String[268]; public static String divisorFile = "divisorAnalysisDivisors.rtf"; public static String strataFile = "divisorAnalysisStrata.rtf"; public static void main(String [] args) { readFromFile(); analysis(); output(); } public static void readFromFile() { try { BufferedReader in = new BufferedReader(new FileReader(divisorFile)); String line = in.readLine(); int count = 0; while (line != null) { StringTokenizer ST = new StringTokenizer(line, " "); String first = ST.nextToken(); String second = ST.nextToken(); divisorTags[count] = first; for(int i = 0; i < second.length() - 1; i++) { divisors[count][i] = Integer.parseInt(second.substring(i, i+1)); } line = in.readLine(); line = in.readLine(); count++; } } catch (FileNotFoundException e) { System.out.println("The system cannot find the file specified. A."); } catch (IOException e) { } catch (NoSuchElementException e) { } try { BufferedReader in = new BufferedReader(new FileReader(strataFile)); String line = in.readLine(); int count = 0; while (line != null) { for(int i = 0; i < line.length() - 1; i++) { strata[count][i] = Integer.parseInt(line.substring(i, i+1)); } line = in.readLine(); line = in.readLine(); count++; } } catch (FileNotFoundException e) { System.out.println("The system cannot find the file specified. A."); } catch (IOException e) { } catch (NoSuchElementException e) { } } public static void analysis() { for(int i = 0; i < 268; i++) { strataTags[i] = " "; for(int j = 0; j < 215; j++) { boolean works = true; for(int k = 0; k < 560; k++) { if(strata[i][k] == 0 && divisors[j][k] == 1) works = false; } if(works) { strataTags[i] = strataTags[i] + " " + divisorTags[j]; } } } } public static void output() { for(int i = 0; i < 268; i++) { System.out.println((i + 1) + " :" + strataTags[i]); } } }
Notice: (null)(): [ALERT] Mailbox is over quota in Unknown on line 0