#t99. 绘制菱形
绘制菱形
Drawing a Diamond
Problem Description
Given a positive integer , draw a diamond of side length grid cells on a canvas of cells, using characters. Empty cells are represented by , and the cells on the edges of the diamond are represented by .
For example, when , the figure is as follows:
..+..
.+.+.
+...+
.+.+.
..+..
Input Format
Input a positive integer .
Output Format
Output lines, representing the diamond drawn as required.
Sample Input
4
Sample Output
...+...
..+.+..
.+...+.
+.....+
.+...+.
..+.+..
...+...
Sample Explanation
When , the canvas size is $(2 \times 4 - 1) \times (2 \times 4 - 1) = 7 \times 7$. We need to draw a diamond of side length 4, i.e. each edge consists of + characters (including the vertices). Starting from the top, the + in the 1st row is at the center (4th character); the 2nd row has two + at positions 3 and 5 with one . in between; the 3rd row has two + at positions 2 and 6 with three . in between; the 4th row (center row) has two + at positions 1 and 7 with five . in between. The lower half is symmetric to the upper half: the 5th row equals the 3rd, the 6th equals the 2nd, and the 7th equals the 1st. This gives the figure in the sample.
Constraints
.