1 条题解
-
3
#include <iostream> using namespace std; const int MAX_SIZE = 20000; int arr[MAX_SIZE]; int main() { int n, m; if (!(cin >> n >> m)) return 0; for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { cin >> arr[i * m + j]; } } cout << m << " " << n << endl; for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { if (j == 0) { cout << arr[j * m + i]; } else { cout << " " << arr[j * m + i]; } } cout << endl; } return 0; }
- 1
信息
- ID
- 467
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 5
- 标签
- 递交数
- 57
- 已通过
- 23
- 上传者