func_code_string: #include <bits/stdc++.h>   const int N = 35;   int n, m;   int A[N][N], F[N][N];   int main() {     scanf( %d , &n);     m = (n + 1) >> 1;     int ans = 0;     for (int i = 1; i <= n; i++)       for (int j = 1; j <= n; j++) {         scanf( %d , &A[i][j]);         ans += A[i][j];       }     for (int i = 1; i <= n; i++)       for (int j = 1; j <= n; j++) F[i][j] = 1;     for (int stat = 0; stat < 1 << m; stat++) {       int sum = 0;       for (int i = 1; i <= m; i++) {         F[m][i] = (stat >> (i - 1) & 1) ? -1 : 1;         sum += (A[m][i] * F[m][i]);       }       for (int i = m + 1; i <= n; i++) {         F[m][i] = F[m][i - m] * F[m][m];         sum += (A[m][i] * F[m][i]);       }       for (int i = 1; i < m; i++) {         int s, ti = i + m;         for (int j = 0; j < 2; j++, F[i][m] *= -1) {           F[i + m][m] = F[i][m] * F[m][m];           int t = (A[i][m] * F[i][m]) + (A[i + m][m] * F[i + m][m]);           for (int k = 1; k < m; k++) {             int tk = k + m;             F[i][tk] = F[i][k] * F[i][m];             F[ti][k] = F[i][k] * F[m][k];             F[ti][tk] = F[i][tk] * F[m][tk];             t += fabs((A[i][k] * F[i][k]) + (A[i][tk] * F[i][tk]) +                       (A[ti][k] * F[ti][k]) + (A[ti][tk] * F[ti][tk]));           }           if (!j || t > s) s = t;         }         sum += s;       }       if (sum > ans) ans = sum;     }     printf( %d n , ans);     return 0;   }   