全排列
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
输出自然数 1 到 n 所有不重复的排列,即 n 的全排列,要求所产生的任一数字序列中不允许出现重复的数字。
禁止使用STL,一经发现本题记0分。
Input Format
一个整数 n。
Output Format
由 1∼n 组成的所有不重复的数字序列,每行一个序列。
每个数字保留 5 个场宽。
3
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
Hint
1≤n≤7
ACM协会暑期培训第三周排位赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 5
- Start at
- 2021-8-8 14:00
- End at
- 2021-8-8 17:30
- Duration
- 3.5 hour(s)
- Host
- Partic.
- 23