n-queens-ii PROBLEM solved with function next_permutation() in <algorithm>