作者:
bztfir (恩恩呵呵)
2010-11-27 20:43:08Arrangement
Given an integer 1<=n<=15, list all the possible arrangements of 1,2,3,..,n
Output the arrangements with increasing order.
Input:
n1
n2
...
nt
Output:
all the possible arrangement
(Output each arrangement on a seperate line. Each number follow by a space.)
Example1
Input:
2
3
Output:
1 2
2 1
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1