this repo has no description
at develop 373 B view raw
1include "alldifferent.mzn"; 2 3int: n; 4 5% Secuencia de números. 6array[1..n] of var 1..n: x; 7 8% Secuencia de diferencias. 9array[1..n-1] of var 1..n-1: u; 10 11constraint alldifferent(x); 12constraint alldifferent(u); 13constraint forall(i in 1..n-1)(u[i] = abs(x[i+1] - x[i])); 14 15solve :: int_search(x, first_fail, indomain_min, complete) 16 satisfy; 17output ["x = ",show(x),"\n"];