Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
139398 邹文浠白云六中 矩阵转置 C++ 通过 100 0 MS 276 KB 443 2024-03-23 17:22:59

Tests(5/5):


#include <bits/stdc++.h> using namespace std; int a[110][110],b[110][110],n,m; int main() { ios::sync_with_stdio(0); cin >> n >> m; for(int i = 0;i < n;i++) { for(int j = 0;j < m;j++) { cin >> a[i][j]; } } for(int i = 0;i < n;i++) { for(int j = 0;j < m;j++) { b[j][i] = a[i][j]; } } for(int i = 0;i < m;i++) { for(int j = 0;j < n;j++) cout << b[i][j] << ' '; cout << '\n'; } }


测评信息: