func_code_string: #include <bits/stdc++.h>   int a[50][50], b[50], n, m;   int work(int st) {     int res = 0;     for (int i = 1, s = st; i <= m; i++, s /= 2)       res += a[i][m] * ((b[i] = (s & 1)) ? -1 : 1);     for (int i = 1; i < m; i++) res += a[i + m][m] * ((b[i] ^ b[m]) ? -1 : 1);     for (int i = 1; i < m; i++) {       int t1 = a[m][i] + a[m][m + i] * (b[m] ? -1 : 1), t2 = -t1;       for (int j = 1; j < m; j++)         t1 += std::abs(a[j][i] + a[j][i + m] * (b[j] ? -1 : 1) + a[j + m][i] +                        a[j + m][i + m] * ((b[m] ^ b[j]) ? -1 : 1));       for (int j = 1; j < m; j++)         t2 += std::abs(a[j][i] + a[j][i + m] * (b[j] ? -1 : 1) - a[j + m][i] +                        a[j + m][i + m] * ((b[m] ^ b[j]) ? 1 : -1));       res += std::max(t1, t2);     }     return res;   }   int main() {     scanf( %d , &n);     m = (n + 1) / 2;     for (int i = 1; i <= n; i++)       for (int j = 1; j <= n; j++) scanf( %d , &a[i][j]);     int ans = 0;     for (int i = 0; i < (1 << m); i++) ans = std::max(work(i), ans);     printf( %d n , ans);   }   