cpp solution for eightqueen