Solve the N queens problem using back track for new online judge.