Introduction - If you have any usage issues, please Google them yourself
Place each n is not an attack on the queen n* n chessboard grid. Think of in accordance with international rules, the Queen can attack at a pawn in the same row or the same column or on the diagonal. After the problem is equivalent to placing n n queens on the chessboard n* n grid, any two queen is not in the same row or the same column or diagonal.