#P337. 练57.1 全排列问题
练57.1 全排列问题
Description
Output all unique permutations of the natural numbers from to , i.e., the full permutation of , ensuring that no duplicate digits appear in any generated sequence.
Input Format
An integer ().
Output Format
All unique sequences of digits from to , with one sequence per line. Each digit should be padded to a width of .
Sample
31 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1