nqueens

optimize queen check