#CCBCHBA0000109. Hình chữ X (X-Shaped Grid)
Hình chữ X (X-Shaped Grid)
X-Shaped Grid
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a positive odd , print an -by- grid. Cell is X if or , and . otherwise. The diagonals meet at one central cell, which is printed once.
Input
One line contains odd integer .
Output
Print exactly lines, each of adjacent characters.
Subtasks
-
Subtask 1 (20%): and is odd.
-
Subtask 2 (30%): and is odd.
-
Subtask 3 (50%): and is odd.
Examples
Example 1
Input:
3
Output:
X.X
.X.
X.X
Explanation:
For n=3, X appears on either diagonal and the center is printed only once.
Example 2
Input:
1
Output:
X
Explanation:
For n=1, X appears on either diagonal and the center is printed only once.