func_code_string: #include <bits/stdc++.h>   using namespace std;   int Min = -10000000;   int Max = -Min;   int A[8] = {1, 1, 0, 0, 1, 1, 1, 1};   int B[8] = {0, 0, 1, 1, 1, 1, -1, -1};   int C[8];   struct Nodes {     int x, y;   } p[100010];   bool operator<(Nodes &p1, Nodes p2) {     if (p1.x == p2.x) return p1.y < p2.y;     return p1.x < p2.x;   }   long long cross(long long x1, long long y1, long long x2, long long y2) {     return x1 * y2 - y1 * x2;   }   int main() {     int i, j, k;     int n;     long long a, b, c, res;     while (scanf( %d , &n) != EOF) {       for (i = 0; i < 8; i++) {         if (i & 1) {           C[i] = Max;         } else           C[i] = Min;       }       for (i = 1; i <= n; i++) {         scanf( %d%d , &p[i].x, &p[i].y);         C[0] = max(C[0], p[i].x);         C[1] = min(C[1], p[i].x);         C[2] = max(C[2], p[i].y);         C[3] = min(C[3], p[i].y);         C[4] = max(C[4], p[i].x + p[i].y);         C[5] = min(C[5], p[i].x + p[i].y);         C[6] = max(C[6], p[i].x - p[i].y);         C[7] = min(C[7], p[i].x - p[i].y);       }       res = 0;       for (i = 0; i < 8; i++) {         Nodes p1, p2;         p1.x = p1.y = Min;         p2.x = p2.y = Max;         for (j = 0; j < 8; j += 2) {           Nodes tmp[2];           for (k = j; k < j + 2; k++) {             c = cross(A[i], B[i], A[k], B[k]);             a = cross(A[i], C[i], A[k], C[k]);             b = cross(C[i], B[i], C[k], B[k]);             if (c == 0) break;             if (b % c || a % c) break;             tmp[k - j].x = b / c;             tmp[k - j].y = a / c;           }           if (k < j + 2) continue;           if (tmp[1] < tmp[0]) swap(tmp[0], tmp[1]);           if (p1 < tmp[0]) p1 = tmp[0];           if (tmp[1] < p2) p2 = tmp[1];         }         res += max(abs(p2.x - p1.x), abs(p2.y - p1.y));       }       cout << res + 4 << endl;     }     return 0;   }   