C. 矩阵转置

    Type: Default 1000ms 128MiB

矩阵转置

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

龙凤苑中学3.21

Not Attended
Status
Done
Rule
IOI
Problem
3
Start at
2025-3-21 16:30
End at
2025-3-21 18:30
Duration
2 hour(s)
Host
Partic.
26