This hole is experimental, no solutions will be saved. Please leave feedback on the GitHub issue.

N Queens

Details

In chess, pieces move on a board of 8 ranks and 8 files. A chess queen can attack along a file a rank or a diagonal. It is possible to place 8 queens on the board, such that no queen is under attack by another one. When we list the rank on which the queen is for each file, one solution looks like this

63571428

Print all solutions to the N queens problem, one per a line, for boards of sizes 4-8.

The output judge is order agnostic. The expected output shown is one of many valid outputs.
0 bytes, 0 chars
Restore solution
All
Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
Fennel is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
ctrl + enter or

Delete Solution

Are you sure you want to delete your solution(s) for N Queens?

If you have seperate bytes and chars solutions then both will be deleted.

This is irreversible, please backup any code you care about.

Type I understand and press confirm to continue.