func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MX = 35;   bitset<MX * MX> bs[MX * MX];   int n, a[MX][MX], m, sz, h, res;   void impr() {     for (int k = 0; k < m; k++) {       cout << k <<  :   <<   n ;       for (int i = 0; i < n; i++) {         for (int j = 0; j < n; j++) cout << bs[k][((i)*n + (j))] <<    ;         cout <<   n ;       }       cout <<   n ;     }   }   int val(int i, int j, bitset<MX * MX> &bs) {     return bs[((i)*n + (j))] ? -a[i][j] : a[i][j];   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> n;     h = (n + 1) / 2;     for (int i = 0; i < n; i++)       for (int j = 0; j < n; j++) {         cin >> a[i][j];         res += a[i][j];       }     for (int i = 0; i < h; i++)       for (int j = 0; j < h; j++) {         for (int x = 0; x < h; x++)           for (int y = 0; y < h; y++) bs[m][((i + x) * n + (j + y))] = 1;         m++;       }     for (int i = 0; i < n * n; i++) {       int ind = -1;       for (int j = sz; j < m; j++)         if (bs[j][i]) ind = j;       if (ind == -1) continue;       swap(bs[ind], bs[sz]);       for (int j = 0; j < m; j++)         if (j != sz && bs[j][i]) bs[j] ^= bs[sz];       sz++;     }     for (int mk = 0; mk < (1 << h); mk++) {       bitset<MX * MX> act;       for (int i = 0; i < h; i++)         if (mk & (1 << i)) act ^= bs[h * (i + 1) - 1];       int p = 0;       for (int i = 0; i < n; i++) p += val(i, h - 1, act);       for (int j = 0; j < h - 1; j++) {         bitset<MX *MX> a = act, b = act ^ bs[h * (h - 1) + j];         int x = val(h - 1, j, a) + val(h - 1, j + h, a);         int y = val(h - 1, j, b) + val(h - 1, j + h, b);         for (int i = 0; i < h - 1; i++) {           int q = val(i, j, a) + val(i + h, j, a) + val(i, j + h, a) +                   val(i + h, j + h, a);           x += max(q, -q);           q = val(i, j, b) + val(i + h, j, b) + val(i, j + h, b) +               val(i + h, j + h, b);           y += max(q, -q);         }         p += max(x, y);       }       res = max(res, p);     }     cout << res <<   n ;     return 0;   }   