next_permutation AC