1639: 无重复数字全排列
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:17
Solved:11
Description
把 1 ∼ n 这n个整数排成一行后随机打乱顺序,输出所有可能的次序
Input
一个整数 n 。1 ≤ n ≤ 9
Output
输出所有方案,每行 1 个
Sample Input Copy
3
Sample Output Copy
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1