The box the rays P36035


Statement
 

pdf   zip

Your task is to write a program that, given three naturals nn, mm and cc prints all the possible rays with the beginning in the column cc in a box n×mn\times m. A ray is a vertical sequence of diagonals to the left / or to the right \backslash (to write that character in C or C++, you should write "\backslash\backslash").

Input

The input consists of three naturals nn, mm and cc, with n>0n>0, m>0m>0 and 0cm0\le c \le m.

Output

Your program must print all the possible rays with the beginning in the columns cc in a box n×mn\times m of asterisks. It must print a line in white after every solution. It can print the solution in any order.

Author: Salvador Roura

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
    Spanish
    Other languages
    Spanish
    Official solutions
    C++
    User solutions
    C++