Sahovnica
의견: 0
\(3^{rd}\) round, December \(15^{th}\), 2012
Mirko has become a hardcore patriot, so he has asked you to draw him a Croatian chessboard
(checkerboard).
The chessboard consists of red and white cells. The upper left cell is red, with the remaining cells
alternating between white and red in rows as well as columns. We will represent red areas with ‘X’
(uppercase letter x) characters, and white areas with ‘.’ (period) characters.
Mirko's chessboard should consist of \(R \times C\) cells, that is, R rows and C columns. Each row should be
A characters high, and each column B characters wide. Consider the sample tests below for further
clarification.
The first line of input contains two positive integers R and C (\(1 \le R\), \(C \le 10\)) from the problem
statement.
The second line of input contains two positive integers A and B (\(1 \le A\), \(B \le 10\)) from the problem
statement.
The output must consist of a total of \(R * A\) rows and \(C * B\) columns, forming the chessboard
described above.
2 4
2 2XX..XX..
XX..XX..
..XX..XX
..XX..XX5 5
2 3XXX...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평가 및 의견
Sahovnica
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Sahovnica