Zeros and ones (2)

Write a program to print all the combinations of non - o zeros and oo ones, for some given nn and oo.

Input

Input consists of nn and oo, two natural numbers such that n>0n > 0 and 0on0 \le o \le n.

Output

Print all the combinations of non - o zeros and oo ones, one per line and in lexicographical order.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:20:25.115Z

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