0101少儿编程
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
IDE下载
Login
Register
10205: 全排列问题
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:6
Solved:0
Submit
Submit Record
Statistics
ShowOff!
Description
输出自然数1到n所有不重复的排列,即n的全排列,要求所产生的任一数字序列中不允许出现重复的数字。
Input
n(1≤n≤9)
Output
由1~n组成的所有不重复的数字序列,每行一个序列。
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
基本算法-回溯算法
洛谷
Submit
Submit Record
Statistics
ShowOff!