import choco.Problem; import choco.integer.*; import choco.Solver; import choco.Solution; import choco.search.*; public class Magic { public static void main(String[] args) throws Exception { //int n = Integer.parseInt(args[0]); int n = 4; Problem pb = new Problem(); IntDomainVar S[][] = new IntDomainVar[n][n]; // the square IntDomainVar T[][] = new IntDomainVar[n][n]; // the square IntDomainVar v[] = new IntDomainVar[n*n]; IntDomainVar A[] = new IntDomainVar[n]; int count = 0; int k = n*(n*n + 1)/2; for (int i=0;i