public class NSort {
public static void main(String[] args) {
int n = 100;
Problem pb = new Problem();
IntVar[] vars = new IntVar[n];
for (int i = 0; i < n; i++) {
vars[i] = pb.makeBoundIntVar("Var" + i, 1, n+1);
if (i > 0) {
pb.post(pb.geq(pb.minus(vars[i], vars[i-1]), 1));
}
}

pb.solve(true);
}
}

// Program pour Palm

public class NSort {
public static void main(String[] args) {
int n = 100;
Problem pb = new PalmProblem();
IntVar[] vars = new IntVar[n];
for (int i = 0; i < n; i++) {
vars[i] = pb.makeBoundIntVar("Var" + i, 1, n+1);
if (i > 0) {
pb.post(pb.geq(pb.minus(vars[i], vars[i-1]), 1));
}
}

pb.solve(true);
}
}
