atcoder#ABC263C. [ABC263C] Monotonically Increasing
[ABC263C] Monotonically Increasing
Score : points
Problem Statement
Print all strictly increasing integer sequences of length where all elements are between and (inclusive), in lexicographically ascending order.
Notes
For two integer sequences of the same length and , is said to be lexicographically earlier than if and only if:
- there is an integer such that for all integers satisfying , and .
An integer sequence is said to be strictly increasing if and only if:
- for all integers .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the sought sequences in lexicographically ascending order, each in its own line (see Sample Outputs).
2 3
1 2
1 3
2 3
The sought sequences are , which should be printed in lexicographically ascending order.
3 5
1 2 3
1 2 4
1 2 5
1 3 4
1 3 5
1 4 5
2 3 4
2 3 5
2 4 5
3 4 5