Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
102206 王为治 矩阵转置 C++ 解答错误 60 0 MS 252 KB 315 2023-09-12 13:53:44

Tests(3/5):


#include <bits/stdc++.h> using namespace std; int a[114514]; int n,m; signed main() { cin >> n >> m; for(int i = 1; i <= n*m; i++)cin >> a[i]; sort(a+1,a+(n*m)+1); for(int i = 1; i <= m; i++) { for(int j = 0; j < n; j++) { cout << a[i+(j*m)] << " "; } cout << endl; } return 0; }


测评信息: