func_code_string: #include <bits/stdc++.h>   using namespace std;   const int NMax = 40, MMax = 200;   int N, nn, A[NMax][NMax], B[NMax];   int get(int a, int b) { return (a ^ b); }   int P(int a, int b) {     if (b)       return a * -1;     else       return a;   }   int main() {     scanf( %d , &N);     nn = (N + 1) >> 1;     for (int i = 1; i <= N; i++)       for (int j = 1; j <= N; j++) scanf( %d , &A[i][j]);     int ret = -100000000;     for (int I = 0; I < (1 << nn); I++) {       int cnt = 0;       int k = I;       for (int i = 1; i <= nn; i++) {         B[i] = (I & 1);         cnt += P(A[i][nn], B[i]);         I >>= 1;       }       I = k;       for (int i = 1; i < nn; i++) cnt += P(A[i + nn][nn], get(B[i], B[nn]));       for (int i = 1; i < nn; i++) {         int tot0 = P(A[nn][i], 0) + P(A[nn][nn + i], get(0, B[nn])),             tot1 = P(A[nn][i], 1) + P(A[nn][nn + i], get(1, B[nn]));         for (int j = 1; j < nn; j++) {           int maxx = -100000000;           for (int first = 0; first < 2; first++) {             int second = 0;             int x1 = get(first, B[j]), x2 = get(second, B[nn]),                 x3 = get(B[j], B[nn]), x4 = get(first, second), x5 = get(x1, x2);             if (get(x3, x4) == x5)               maxx =                   max(maxx, P(A[j][i], first) + P(A[j][nn + i], x1) +                                 P(A[nn + j][i], x4) + P(A[nn + j][nn + i], x5));           }           if (maxx != -100000000)             tot0 += maxx;           else             tot0 = -100000000;         }         for (int j = 1; j < nn; j++) {           int maxx = -100000000;           for (int first = 0; first < 2; first++) {             int second = 1;             int x1 = get(first, B[j]), x2 = get(second, B[nn]),                 x3 = get(B[j], B[nn]), x4 = get(first, second), x5 = get(x1, x2);             if (get(x3, x4) == x5)               maxx =                   max(maxx, P(A[j][i], first) + P(A[j][nn + i], x1) +                                 P(A[nn + j][i], x4) + P(A[nn + j][nn + i], x5));           }           if (maxx != -100000000)             tot1 += maxx;           else             tot1 = -100000000;         }         cnt += max(tot0, tot1);       }       ret = max(ret, cnt);     }     printf( %d n , ret);     return 0;   }   