Display program code

nqueens1.pl : Solves n-queens problem
Solves the N-queens puzzle:
Place N queens on an NxN chessboard such that they do not attack each other.
This means no two queens may be on the same row, column or diagonal.

How to use:
The solution to the N-queens puzzle is a list with N elements: the M-th element defines the row for the queen in column M.
solve(N,Sol) returns one solution for the N-queens problem in Sol.
solveall(N,SolN,SolL) returns for the N-queens problem the number of solutions in SolN and the list of all solutions in SolL.

Program: Change the code, then submit!

Console: Enter query or select example from below, then submit and wait for answer!

Select example query: 

WebCHR help - CHR Website - (c) Copyrights Martin Kaeser Uni Ulm 2007