QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 128 MB Total points: 10

#10634. Obraz

统计

Bajtazar 是拜托克现代艺术博物馆的馆长。作为最新展览的一部分,一幅由 Bajtass 创作的巨幅画作被送到了博物馆。博物馆的工作人员立即将这幅画挂在了博物馆最大的墙上。

就在展览开始之前,Bajtazar 决定亲自确认展览是否准备妥当。他刚刚走进展示 Bajtass 作品的展厅,开始仔细地观察这幅画。不幸的是,他无法理解这幅画所传达的寓意。他脑中闪过一个令人不安的念头——也许这幅画本应该以不同的方式悬挂,应该顺时针旋转 90 度!

距离展览开幕时间所剩无几,因此 Bajtazar 不愿请求工作人员重新挂画,除非这确实是绝对必要的。幸运的是,Bajtazar 可以更方便地验证自己的猜想——他手头有这幅画的电子版复制图。请帮助他,写一个程序,将该图像顺时针旋转 90 度。

输入格式

输入的第一行包含两个整数 $n$ 和 $m$($1 \le n, m \le 1\,000$),表示画作的尺寸。接下来是画作复制图的描述:$n$ 行,每行包含 $m$ 个字符,字符为 '.' 或 '#'。

输出格式

你的程序应输出旋转 90 度后的画作复制图,共 $m$ 行,每行包含 $n$ 个字符,字符为 '.' 或 '#'。

示例

输入

14 9
.........
.........
.#######.
.#..#....
.#..#....
.#######.
.........
.........
.####....
.#..#....
.#..#....
.#######.
.........
.........

输出

..............
..####..####..
..#..#..#..#..
..#..#..#..#..
..####..####..
..#.....#..#..
..#.....#..#..
..#.....#..#..
..............
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.