曹文信息在线OJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
2284: N个任意数的全排列
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:125
Solved:86
Submit
Submit Record
Statistics
Web Board
ShowOff!
Description
已知 n 个整数 x1x2…xn(从小到大排列好的),输出这 n 个整数的全排列。
Input
输入数据包含两行:
第一行包含一个正整数n (1<=n<=10)
第二行 包含n个正整数x1,x2,…xn(1<=xi<=9)。
Output
输出若干行,每行包括n个数据,每个数据用两个位置输出,表示一种排列方案。
Sample Input
Copy
3 5 7 9
Sample Output
Copy
5 7 9 5 9 7 7 5 9 7 9 5 9 5 7 9 7 5
Source/Category
高级A