func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, cnt_t = 0;   vector<pair<int, int>> ls_[2];   vector<int> upb, downb;   bool cmp(pair<int, int> a, pair<int, int> b) {     if (a.first != b.first) {       return a.first < b.first;     }     return a.second < b.second;   }   long long proc(vector<pair<int, int>> &ls) {     long long sum = 0;     int sz = ls.size();     if (sz == 0) return 0;     sort(ls.begin(), ls.end(), cmp);     int ex_up = 0, ex_down = 0;     int bup = -200001;     int bdown = -bup;     int i, rup, rdown;     for (i = 0; i < sz; i++) {       if (ls[i].second > bup || ls[i].second == bup && ls[i].first > rup) {         bup = ls[i].second, rup = ls[i].first;       }       if (ls[i].second < bdown || ls[i].second == bdown && ls[i].first > rdown) {         bdown = ls[i].second, rdown = ls[i].first;       }     }     int j, k;     int bd;     bd = ls[0].second;     int bsz = (ls.back().first - ls[0].first) / 2;     upb.clear();     upb.resize(bsz);     downb.clear();     downb.resize(bsz);     for (i = 0, k = ls[0].first; k < rup; k += 2) {       for (j = i; ls[j].first == k; j++)         ;       if (j > i) {         if (ls[j - 1].second > bd) bd = ls[j - 1].second;         i = j;       }       upb[(k - ls[0].first) / 2] = bd;     }     bd = ls[0].second;     for (i = 0, k = ls[0].first; k < rdown; k += 2) {       for (j = i; ls[j].first == k; j++)         ;       if (j > i) {         if (ls[i].second < bd) bd = ls[i].second;         i = j;       }       downb[(k - ls[0].first) / 2] = bd;     }     bd = ls.back().second;     for (i = sz - 1, k = ls.back().first; k > rup; k -= 2) {       for (j = i; ls[j].first == k; j--)         ;       if (j < i) {         if (ls[i].second > bd) bd = ls[i].second;         i = j;       }       upb[bsz - 1 - (ls.back().first - k) / 2] = bd;     }     bd = ls.back().second;     for (i = sz - 1, k = ls.back().first; k > rdown; k -= 2) {       for (j = i; ls[j].first == k; j--)         ;       if (j < i) {         if (ls[j + 1].second < bd) bd = ls[j + 1].second;         i = j;       }       downb[bsz - 1 - (ls.back().first - k) / 2] = bd;     }     for (i = 0; i < bsz; i++) {       if (upb[i] >= downb[i]) {         sum += (upb[i] - downb[i]) / 2;       }     }     return sum;   }   int main() {     int n, i, u, v;     scanf( %d , &n);     ls_[0].clear();     ls_[1].clear();     for (i = 0; i < n; i++) {       scanf( %d%d , &u, &v);       ls_[((u + v) % 2 + 2) % 2].push_back(make_pair(u - v, u + v));     }     long long ans = proc(ls_[0]) + proc(ls_[1]);     printf( %lld n , ans);     return 0;   }   