阿吧阿吧

lyq123 星空寂静 2024-01-30 17:42:34 9

#include <bits/stdc++.h> using namespace std; int a[105][105], b[105][105]; int main() { int m, n; 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++) {
        if (a[i][j] == 0 && b[i][j] == 0)
            cout << 0 << '  ';
        else
            cout << 1 << '  ';
    }
    cout << endl;
}
return 0;

}//有错

{{ vote && vote.total.up }}