The rays box P92237


Statement
 

pdf   zip

thehtml

Write a program that, given three natural numbers n, m and c, prints all the possible rays with beginning at 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 ≤ cm.

Output

Your program must print all the possible rays with beginning at the column c in a box n × m of asterisks. It must print a line in white after each solution.

Information about the checker

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

Public test cases
  • Input

    3 5 3
    

    Output

    *******
    *  /  *
    * /   *
    */    *
    *******
    
    *******
    *  /  *
    * /   *
    * \   *
    *******
    
    *******
    *  /  *
    *  \  *
    *  /  *
    *******
    
    *******
    *  /  *
    *  \  *
    *   \ *
    *******
    
    *******
    *   \ *
    *   / *
    *  /  *
    *******
    
    *******
    *   \ *
    *   / *
    *   \ *
    *******
    
    *******
    *   \ *
    *    \*
    *    /*
    *******
    
    
  • Input

    2 5 3
    

    Output

    *******
    *  /  *
    * /   *
    *******
    
    *******
    *  /  *
    *  \  *
    *******
    
    *******
    *   \ *
    *   / *
    *******
    
    *******
    *   \ *
    *    \*
    *******
    
    
  • Input

    4 1 0
    

    Output

    ***
    *\*
    */*
    *\*
    */*
    ***
    
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++