Multisets (2)

Write a program that, given three numbers n, x and y, prints all the
multisets that can be made up with {1, …, n}, in such a way that every
number appears between x and y times.

Input

Input consists of a natural number n > 0, followed by a natural number
x ≥ 0, followed by a natural number y > x.

Output

Print all the multisets that can be made up with {1, …, n}, using each
number between x and y times. The numbers inside each multiset must
appear in non-decreasing order.

Information about the checker

You can print the solutions to this exercise in any order.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T11:36:44.947Z

© Jutge.org, 2006–2026.
https://jutge.org
