#P7754. [COCI 2012/2013 #3] SAHOVNICA
[COCI 2012/2013 #3] SAHOVNICA
Description
A chessboard consists of red squares and white squares. The top-left square of the chessboard is red. The remaining squares alternate between white and red across the board. In this problem, we use X to represent a red area and . to represent a white area. Mirko's chessboard should consist of squares, and each square is an character matrix made up of the characters X and .. Please help him draw this chessboard.
Input Format
The input consists of two lines.
The first line contains two integers , representing the number of rows and columns of the chessboard, respectively.
The second line contains two integers , representing the number of rows and columns of the character matrix in each square, respectively.
Output Format
Output a total of lines, each containing characters, describing the final drawn chessboard.
2 4
2 2
XX..XX..
XX..XX..
..XX..XX
..XX..XX
5 5
2 3
XXX...XXX...XXX
XXX...XXX...XXX
...XXX...XXX...
...XXX...XXX...
XXX...XXX...XXX
XXX...XXX...XXX
...XXX...XXX...
...XXX...XXX...
XXX...XXX...XXX
XXX...XXX...XXX
Hint
【Constraints】
For all testdata, .
【Source】
This problem is from COCI 2012-2013 CONTEST 3 T1 SAHOVNICA. Following the original testdata configuration, the full score is 50 points.
Translated and organized by Eason_AC.
Translated by ChatGPT 5
京公网安备 11011102002149号