Problem B
Gokigen Naname
Gokigen Naname is a Japanese puzzle game played on a square grid in which numbers in circles appear at some of the intersections on the grid.
The objective is to draw diagonal lines in each cell of the grid, such that the number in each circle equals the number of lines extending from that circle. Additionally, it is forbidden for the diagonal lines to form an enclosed loop.
![\includegraphics[width=.3\textwidth ]{fig1}](/problems/gokigen/file/statement/en/img-0001.png)
![\includegraphics[width=.3\textwidth ]{fig2}](/problems/gokigen/file/statement/en/img-0002.png)
Input
The first line of the input contains a single integer
Output
The output should contain
Sample Input 1 | Sample Output 1 |
---|---|
3 1.1. ...0 .3.. ..2. |
\// \\\ /\/ |
Sample Input 2 | Sample Output 2 |
---|---|
5 .21... ..33.0 ...... ..33.. 0..33. ....11 |
/\\// //\\\ \\\// \/\\/ ///\\ |