You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
549 B
23 lines
549 B
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
int main() {
|
|
int n, m, a[110][110], b[110][110];
|
|
cin >> n >> m;
|
|
for (int i = 1; i <= n; i++) {
|
|
for (int j = 1; j <= m; j++) {
|
|
cin >> a[i][j];
|
|
}
|
|
}
|
|
for (int i = 1; i <= n; i++) {
|
|
for (int j = 1; j <= m; j++) {
|
|
cin >> b[i][j];
|
|
}
|
|
}
|
|
for (int i = 1; i <= n; i++) {
|
|
for (int j = 1; j <= m; j++) {
|
|
cout << a[i][j] + b[i][j] << " ";
|
|
}
|
|
cout << endl;
|
|
}
|
|
return 0;
|
|
} |