param n; set N := 1..n; param c{N,N}; var x{N,N} binary; var u{N}; minimize z: sum {i in N, j in N} c[i,j] * x[i,j]; cin {j in N}: sum {i in N} x[i,j] = 1; cout {i in N}: sum {j in N} x[i,j] = 1; b1 {i in 2..n, j in 2..n}: (n-1)*x[i,j] + u[i] - u[j] <= n - 2; end;