This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
dekker-phd-thesis/assets/listing/back_queens.mzn

9 lines
211 B
MiniZinc

int: n;
set of int: ROW = 1..n;
set of int: COL = 1..n;
array [COL] of var ROW: q;
constraint all_different(q);
constraint all_different([q[i] + i | i in COL]);
constraint all_different([q[i] - i | i in COL]);