矩阵转置

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.

题目描述

输入一个 nnmm 列的矩阵 AA ,输出它的转置 ATA^T

输入

第一行包含两个整数 nnmm ,表示矩阵 AA 的行数和列数(1n1001m1001≤n≤100,1≤m≤100)。

接下来 nn 行,每行 mm 个整数,表示矩阵 AA 的元素。相邻两个整数之间用单个空格隔开,每个元素均在 110001 到1000 之间。

输出

mm 行,每行 nn 个整数,为矩阵 AA 的转置。相邻两个整数之间用单个空格隔开。

样例

3 3
1 2 3
4 5 6
7 8 9

1 4 7
2 5 8
3 6 9

基础班暑假集训

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
23
Start at
2025-7-29 23:00
End at
2025-8-21 21:00
Duration
550 hour(s)
Host
Partic.
11