Skip to content

Commit

Permalink
ready revert
Browse files Browse the repository at this point in the history
  • Loading branch information
javaarchive committed Jul 4, 2020
1 parent aaefcaa commit 68b0e92
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions USACOClassLiveTest/src/cownomics.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,40 @@ public static void main(String[] args) throws IOException {
M = Integer.parseInt(st.nextToken());
// String[] spotty = new String[N];
// String[] spotless = new String[N];
boolean seen[][][] = new boolean[4][4][4];
int seen[][][] = new int[64];
for (int i = 0; i < N; i++) {
String line = f.readLine();
for (int j = 0; j < M; j++) {
for(int k = l+1; k < M; k ++){
for(int k = j+1; k < M; k ++){
for(int l = k+1; l < M; l ++){
seen[NUMERIZE(line.charAt(j))][NUMERIZE(line.charAt(k))][NUMERIZE(line.charAt(l))] = true;
seen[NUMERIZE(line.charAt(j))*16 + NUMERIZE(line.charAt(k))*4 + NUMERIZE(line.charAt(l))][i][j][k]];

}
}
}
}
for (int i = 0; i < N; i++) {
String line = f.readLine();
for (int j = 0; j < M; j++) {
for(int k = l+1; k < M; k ++){
for(int k = j+1; k < M; k ++){
for(int l = k+1; l < M; l ++){
seen[NUMERIZE(line.charAt(j))][NUMERIZE(line.charAt(k))][NUMERIZE(line.charAt(l))] = !seen[NUMERIZE(line.charAt(j))][NUMERIZE(line.charAt(k))][NUMERIZE(line.charAt(l))];
seen[NUMERIZE(line.charAt(j))][NUMERIZE(line.charAt(k))][NUMERIZE(line.charAt(l))] = 0;
}
}
}
}

int count = 0;
for(boolean[][] dim2: seen){
for(boolean[] dim3: dim2){
for(boolean state: dim3){
if(state){
count ++;
for(int[][] dim2: seen){
for(int[] dim3: dim2){
for(int state: dim3){
if(state != 0){
count += state;
}
}
}
}
//System.out.println(Arrays.deepToString(seen).replace("]", "]\n"));
pw.println(count);
pw.close();
}
Expand Down

0 comments on commit 68b0e92

Please sign in to comment.