P10448 Combinational Enumeration

Description

Randomly choose $m$ integers from the $n$ integers $1 \sim n$, and output all possible selection schemes.

Input Format

Two integers $n, m$, separated by a space on the same line.

Output Format

Output all schemes in increasing order, one scheme per line. First, the numbers on the same line are in ascending order, and adjacent numbers are separated by one space. Second, for two different lines, compare the numbers at the same positions one by one; the line with smaller lexicographical order comes first (for example, `1 3 5 7` comes before `1 3 6 8`).

Explanation/Hint

For all testdata, $0 \le m \le n$, and $n+(n-m) \le 25$. Translated by ChatGPT 5