func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, i, j, s = 0, o;     cin >> n;     char *a[n + 1], str[n + 1];     for (i = 0; i < n; i++) {       cin >> str;       a[i] = (char *)malloc(n + 1);       strcpy(a[i], str);     }     for (i = 0; i < n && s == 0; i++)       for (j = 0; j < n && s == 0; j++) {         o = 0;         if (j != 0 && a[i][j - 1] ==  o ) o++;         if ((j != n - 1) && a[i][j + 1] ==  o ) o++;         if (i != 0 && a[i - 1][j] ==  o ) o++;         if ((i != n - 1) && a[i + 1][j] ==  o ) o++;         if (o % 2 != 0) s = 1;       }     if (s)       cout <<  NO ;     else       cout <<  YES ;   }   