A1164 | [COCI-2008_2009-contest4]#4 ROT
来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0
题目描述
Damir likes to rotate. Right now he is rotating tables of letters. He wrote an R×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.
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 ≤ R ≤ 10, 1 ≤ C ≤ 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).
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.
输入输出样例
输入 #1
3 5 damir marko darko 45
输出 #1
d m a d a m a r i r k r k o o
输入 #2
3 5 damir marko darko 90
输出 #2
dmd aaa rrm kki oor
输入 #3
5 5 abcde bcdef cdefg defgh efghi 315
输出 #3
e d f c e g b d f h a c e g i b d f h c e g d f
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted