#C4222. Grid Square Sides and Colors
Grid Square Sides and Colors
Grid Square Sides and Colors
In this problem, you are given an integer ( n ) (with ( 1 \le n \le 100 )) representing the size of a grid. The grid consists of ( n \times n ) cells. Each cell (square) in the grid has four sides with associated colors: the top side is labeled as 'Color_1', the right side as 'Color_2', the bottom side as 'Color_3', and the left side as 'Color_4'. Each side is represented by its two endpoints ((x_1, y_1)) and ((x_2, y_2)) along with its color. The coordinate system is defined such that the bottom-left corner of the grid is ((0, 0)) and the top-right corner is ((n, n)).
Your task is to output the list of all sides for every square in the grid. Read the integer from standard input (stdin) and output each side on a separate line in the following format:
x1 y1 x2 y2 color
For example, when ( n = 1 ), the expected output is:
0 0 1 0 Color_3 0 1 1 1 Color_1 0 0 0 1 Color_4 1 0 1 1 Color_2
inputFormat
A single integer ( n ) denoting the size of the grid. The input is provided via standard input (stdin).
outputFormat
Output the sides of all squares in the grid. Each line of output should contain five values: ( x_1 ), ( y_1 ), ( x_2 ), ( y_2 ), and the side's color. The output should be written to standard output (stdout).## sample
1
0 0 1 0 Color_3
0 1 1 1 Color_1
0 0 0 1 Color_4
1 0 1 1 Color_2
</p>