implement bit-shifting n-queens