No.565 Rotation and Enlargement
問題文最終更新日: 2026-06-25 18:03:55
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 173
(順位表)
の他の問題:
Problem Statement
Yuki is interested in image processing. As a first step, Yuki has decided to work on enlargement and rotation. However, Yuki is busy, so please write such a program instead.
Input
R K
H W
$c_{0,0}$ $c_{0,1}$ $c_{0,2}$ $\dots$ $c_{0,W-1}$
$c_{1,0}$ $c_{1,1}$ $c_{1,2}$ $\dots$ $c_{1,W-1}$
$c_{2,0}$ $c_{2,1}$ $c_{2,2}$ $\dots$ $c_{2,W-1}$
$\vdots$
$c_{H-1,0}$ $c_{H-1,1}$ $c_{H-1,2}$ $\dots$ $c_{H-1,W-1}$
- $R \in \{ 0, 90, 180, 270 \}$
- $1 \le K \le 10$
- $1 \le H \le 10$
- $1 \le W \le 10$
- $c_{y,x}$ is `.` or `#`
Output
Output the figure obtained by rotating the given $H \times W$ figure clockwise by $R^\circ$ and enlarging it by a factor of $K$. Print a newline at the end.
Sample
Sample 1
Input
90 1 5 6 .#.... .#.... .##### .#.... .#....
Output
..... ##### ..#.. ..#.. ..#.. ..#..
Sample 2
Input
0 4 2 2 #. .#
Output
####.... ####.... ####.... ####.... ....#### ....#### ....#### ....####
Sample 3
Input
270 3 3 1 # . #
Output
###...### ###...### ###...###
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
はむこ