Problem1391--全排列(递归入门4)(4)(课程ZJ)

1391: 全排列(递归入门4)(4)(课程ZJ)

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

输入一个数字N,按字典序列出1至N的全排列。1<=N<=7

Output


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

Source/Category

递归