#P1706. 全排列问题
全排列问题
Description
Output, in lexicographic order, all non-repeating permutations of the natural numbers to , i.e., the full set of permutations of to . No generated sequence may contain repeated numbers.
Input Format
A single integer .
Output Format
All non-repeating sequences composed of , one sequence per line. Each number should be printed in a field of width .
3
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
Hint
。
Translated by ChatGPT 5
京公网安备 11011102002149号