this repo has no description
at develop 466 B view raw
1annotation bitdomain(int:nwords); 2 3include "alldifferent.mzn"; 4 5int: n; 6array [1..n] of var 1..n: q :: bitdomain(n div 32); 7 8constraint alldifferent(q) :: domain; 9constraint alldifferent([ q[i] + i | i in 1..n]) :: domain; 10constraint alldifferent([ q[i] - i | i in 1..n]) :: domain; 11 12ann: search_ann; 13 14solve :: search_ann satisfy; 15 16output [ if fix(q[j]) == i then "Q" else "." endif ++ 17 if j == n then "\n" else "" endif | i,j in 1..n]