Skip to content

Instantly share code, notes, and snippets.

@suicide
Created April 2, 2014 15:37
Show Gist options
  • Save suicide/9936610 to your computer and use it in GitHub Desktop.
Save suicide/9936610 to your computer and use it in GitHub Desktop.
package squaredetector;
/**
* Created by psy on 02.04.14.
*/
public class SquareDetector {
private final int dimension;
private final char[][] field;
public SquareDetector(int dimension, char[][] field) {
this.dimension = dimension;
this.field = field;
}
public boolean evaluate() {
return false;
}
}
package squaredetector;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
/**
* Created by psy on 02.04.14.
*/
public class SquareMain {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
List<String> output = new LinkedList<String>();
int games = Integer.parseInt(in.nextLine());
for (int i = 1; i <= games; i++) {
int dimension = in.nextInt();
char[][] field = new char[dimension][dimension];
in.nextLine();
for (int j = 0; j < dimension; j++) {
field[j] = in.nextLine().toCharArray();
}
SquareDetector detector = new SquareDetector(dimension, field);
boolean result = detector.evaluate();
output.add("Case #" + i + ": " + (result ? "YES" : "NO"));
}
for (String out : output) {
System.out.println(out);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment