Rajos??? P26271


Statement
 

pdf   zip

thehtml

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≤ cm.

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.

Public test cases
  • Input

    a6
    2
    d5 1
    g6 1
    

    Output

    taulell inicial incorrecte
    
  • Input

    a4
    2
    b8 1
    c1 1
    

    Output

    escac i mat!!!
    
  • Input

    h8
    3
    a1 1
    b1 1
    a2 2
    

    Output

    escac i mat!!!
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions