1 条题解
-
-1
#include <bits/stdc++.h> using namespace std; int m, n; int a[105][105], b[105][105], c[105][105]; int main() { cin >> m >> n; for (int i = 1; i <= m; i++) for (int j = 1; j <= n; j++) cin >> a[i][j]; for (int i = 1; i <= m; i++) for (int j = 1; j <= n; j++) cin >> b[i][j]; for (int i = 1; i <= m; i++) for (int j = 1; j <= n; j++) c[i][j] = a[i][j] + b[i][j]; for (int i = 1; i <= m; i++) { for (int j = 1; j <= n; j++) cout << c[i][j] << " "; cout << "\n"; } return 0; }
- 1
信息
- ID
- 344
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 84
- 已通过
- 63
- 上传者