The box of the rays

Write a program that, given three natural numbers n, m and c prints all
the possible rays with the beginning in the column c in a box n × m. A
ray is a vertical sequence of diagonals to the left or to the right.

Input

Input consists of three natural numbers n, m and c, with n > 0, m > 0
and 0 ≤ c ≤ m.

Output

Your program must print all the possible rays with the beginning in the
columns c in a box n × m. The solutions must appear in the same order
than in the instances. It must print asterisks around every solution,
and print a line in white after each solution.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:28:29.100Z

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