+ 1
9 queens be set on chessboard
how to set 9 queens on the chessboard such that they don't cut each other horizontally, vertically and diagonally
2 Réponses
+ 9
You can use this script if you like. Anything up to 6 queens is no problem, more than that might take a couple of hours to calculate (and will definitely not work in Sololearn)
/Edit: I've changed it for a more systematic approach, now everything up to eight queens works
/Edit: optimized it, there's no solution for nine queens. Which is actually quite obvious
https://code.sololearn.com/cPF0SN57La7C/?ref=app
0
https://www.google.es/amp/s/www.geeksforgeeks.org/backtracking-set-3-n-queen-problem/amp/