this repo has no description
1int: n; % size of latin square
2array[1..n,1..n] of var 1..n: a;
3
4include "alldifferent.mzn";
5constraint forall(i in 1..n)(
6 alldifferent(j in 1..n)(a[i,j]) /\
7 alldifferent(j in 1..n)(a[j,i])
8 );
9solve satisfy;
10output [ show(a[i,j]) ++ if j == n then "\n" else " " endif |
11 i in 1..n, j in 1..n ];