func_code_string: #include <bits/stdc++.h>   using namespace std;   long long int power(long long int x, long long int n) {     if (n == 0)       return 1;     else if (n % 2 == 0)       return power(x * x, n / 2);     else       return x * power(x * x, (n - 1) / 2);   }   long long int highestPowerof2(long long int n) {     long long int p = (long long int)log2(n);     return (long long int)pow(2, p);   }   long long int powermod(long long int x, long long int y, long long int p) {     long long int res = 1;     x = x % p;     if (x == 0) return 0;     while (y > 0) {       if (y & 1) res = (res * x) % p;       y = y >> 1;       x = (x * x) % p;     }     return res;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     long long int n, m, i, j, k, count;     bool ok = false;     cin >> n >> m;     long long int a[n][m];     long long int arr[n][m];     memset(arr, -1, sizeof(arr));     for (i = 0; i < n; i++) {       for (j = 0; j < m; j++) cin >> a[i][j];     }     for (i = 0; i < n; i++) {       for (j = 0; j < m; j++) {         if (a[i][j] == 0) {           for (k = 0; k < n; k++) arr[k][j] = 0;           for (k = 0; k < m; k++) arr[i][k] = 0;         }       }     }     for (i = 0; i < n; i++) {       for (j = 0; j < m; j++) {         if (arr[i][j] == -1) arr[i][j] = 1;       }     }     for (i = 0; i < n; i++) {       for (j = 0; j < m; j++) {         count = 0;         if (a[i][j] == 1) {           for (k = 0; k < n; k++)             if (arr[k][j] == 1) count++;           for (k = 0; k < m; k++)             if (arr[i][k] == 1) count++;           if (count == 0) {             ok = true;             break;           }         } else if (a[i][j] == 0) {           for (k = 0; k < n; k++)             if (arr[k][j] == 1) count++;           for (k = 0; k < m; k++)             if (arr[i][k] == 1) count++;           if (count != 0) {             ok = true;             break;           }         }       }       if (ok) break;     }     if (ok)       cout <<  NO  << endl;     else {       cout <<  YES  << endl;       for (i = 0; i < n; i++) {         for (j = 0; j < m; j++) {           cout << arr[i][j] <<    ;         }         cout << endl;       }     }   }   