https://en.wikipedia.org/wiki/Heap%27s_algorithm いらないかも。next_permutation があれば十分そう。
https://en.wikipedia.org/wiki/Heap%27s_algorithm
いらないかも。next_permutation があれば十分そう。