Type: Default 1000ms 256MiB

练57.1 全排列问题

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

Output all unique permutations of the natural numbers from 11 to nn, i.e., the full permutation of nn, ensuring that no duplicate digits appear in any generated sequence.

Input Format

An integer nn (1n91≤n≤9).

Output Format

All unique sequences of digits from 11 to nn, with one sequence per line. Each digit should be padded to a width of 55.

Sample

3
1    2    3
1    3    2
2    1    3
2    3    1
3    1    2
3    2    1

20251025D班作业(4)

Not Claimed
Status
Done
Problem
12
Open Since
2025-10-26 0:00
Deadline
2025-11-3 23:59
Extension
24 hour(s)