二维数组旋转
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
给定一个n*n的二维数组。 输出一个基于中心点90度的二维数组,和一个基于对角线(左上右下)交换的二维数组。
Input Format
第一行,一个整数N 2<=N<=100 接下来N行,每行N个用空格隔开的整数。
Output Format
首先输出N行,每行N个整数,是输入二维数组的旋转90度。 然后是个空行。 再输出N行,每行N个整数,是上面数组的水平翻转。
Sample
input
3
1 2 3
4 5 6
7 8 9
output
7 4 1
8 5 2
9 6 3
1 4 7
2 5 8
3 6 9
Hint
时间限制:
20200818二维数组练习
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 11
- Start at
- 2020-8-18 8:25
- End at
- 2020-8-21 8:25
- Duration
- 72 hour(s)
- Host
- Partic.
- 23