Combination 2
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given two natural numbers n
and k
(where n ≤ k
), your task is to output all possible increasing subsequences of length n
using numbers from 1
to k
.
Input
The input consists of two numbers: n
and k
(with k ≤ 1000
).
Output
Print each subsequence on a separate line. Ensure that each number in a subsequence is separated by a single space. The output should conclude with a newline character.
Examples
Input #1
Answer #1
Submissions 361
Acceptance rate 29%