Rot
의견: 0
Damir likes to rotate. Right now he is rotating tables of letters. He wrote an \(R \times C\) table onto a piece of paper. He has also chosen an angle \(K\), a multiple of \(45\), and wants to rotate his table that many degrees clockwise.
It turns out this task is a bit too hard for Damir, so help him out.
The first line contains two integers \(R\) and \(C\) separated by a space (\(1 \le R \le 10\), \(1 \le C \le 10\)), the number of rows and columns in Damir's table.
Each of the next \(R\) lines contains one row of Damir's table, a string of \(C\) lowercase letters.
The last line contains an integer \(K\), a multiple of \(45\) between \(0\) and \(360\) (inclusive).
Output Damir's table rotated \(K\) degrees clockwise, like shown in the examples. The output should contain the smallest number of rows necessary. Some rows may have leading spaces, but no rows may have trailing spaces.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 70점 |
3 5
damir
marko
darko
45 d
m a
d a m
a r i
r k r
k o
o3 5
damir
marko
darko
90dmd
aaa
rrm
kki
oor5 5
abcde
bcdef
cdefg
defgh
efghi
315 e
d f
c e g
b d f h
a c e g i
b d f h
c e g
d f
e평가 및 의견
Rot
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Rot