Hide

Problem C
Darkness Detector

/problems/darknessdetector/file/statement/en/img-0001.jpg
“Glowing Image of a Moon Eclipse” by melissa mayes on pexels.com.

You are designing a special detector chip to measure the variation in light levels during the upcoming total solar eclipse. Due to printing technology limitations, the chip exists on a square grid, where each square must contain a diagonal wire connecting two opposite corners of the square. Two diagonal wires touching the same corner are connected, and electricity can flow through any sequence of connected wires.

The sensitivity of the detector chip is ultimately determined by the number of connected components, where a connected component is defined as a maximal set of mutually connected wires. Since you need to calibrate the sensitivity precisely for optimal data recording, you must design a circuit with the required number of connected components.

Input

The input consists of three space-separated integers $r$, $c$, and $n$ ($1 \leq r, c \leq 1000$; $1 \leq n \leq r+c-1$), where $r$ and $c$ give the required size of the detector, and $n$ is the required number of connected components.

Output

Output $r$ lines of $c$ characters each. Each line must contain only the characters / and \, with no trailing spaces and a single trailing newline character on each line (including the last). Overall, the resulting circuit must have exactly $n$ connected components. In general, there will be multiple valid solutions; you may output any of them.

Sample Input 1 Sample Output 1
2 2 1
/\
\/
Sample Input 2 Sample Output 2
2 2 2
\/
//
Sample Input 3 Sample Output 3
2 2 3
\\
\\

Please log in to submit a solution to this problem

Log in