#K4711. Generate X-Matrix
Generate X-Matrix
Generate X-Matrix
You are given an integer \( N \) and are required to generate an X-Matrix of size \( 2N-1 \) by \( 2N-1 \). The matrix is defined such that the elements on the two main diagonals are \( 1 \) and all other entries are \( 0 \). For example, when \( N = 2 \), the resulting matrix is:
1 0 1 0 1 0 1 0 1
And for \( N = 3 \), the resulting matrix is:
1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1
Your task is to generate the matrix and print it line by line. Each row should be printed as space separated integers.
inputFormat
The input consists of a single integer \( N \) (\( 1 \leq N \leq 100 \)), read from standard input.
outputFormat
Output the corresponding X-Matrix printed on \( 2N-1 \) lines where each line contains \( 2N-1 \) space-separated integers.
## sample1
1