Toggle navigation
万里ACM
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem R: 矩阵转置
Problem R: 矩阵转置
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
142
Solved:
101
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
输入一个矩阵,共M行N列(1≤M,N≤10),矩阵中的每个元素均为整数,将其转置后输出
Input
输入格式为:两个正整数M,N,之后共有M行N列的整数值
Output
矩阵转置之后的结果,共N行M列的整数值,每个整数值之前有一个空格,每行结尾有一个\n
Sample Input
Copy
2 3 1 2 3 4 5 6 3 2 1 4 2 5 3 6
Sample Output
Copy
1 4 2 5 3 6 1 2 3 4 5 6