func_code_string: #include <bits/stdc++.h>   using namespace std;   pair<int, int> w[200000 + 20];   int a[200000 + 20][3];   vector<pair<int, pair<int, int> > > to_compress;   int n;   void maximize(int &a, int b) {     if (a < b) a = b;   }   struct Fenwick_tree {     int bit[1000000 + 50];     void update(int x, int v) {       for (; x <= 1000000; x += x & (-x)) maximize(bit[x], v);     }     int get(int x) {       int res = 0;       for (; x > 0; x -= x & (-x)) maximize(res, bit[x]);       return res;     }   };   Fenwick_tree LIS;   int ans = 0;   void compress() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) scanf( %d %d , &w[i].first, &w[i].second);     sort(w + 1, w + 1 + n);     for (int i = 1; i <= n; i++) {       to_compress.push_back(pair<int, pair<int, int> >(w[i].first + w[i].second,                                                        pair<int, int>(i, 1)));       to_compress.push_back(pair<int, pair<int, int> >(w[i].first - w[i].second,                                                        pair<int, int>(i, 2)));     }     sort(to_compress.begin(), to_compress.end());     int curr = 0;     for (int i = 0; i < to_compress.size(); i++) {       if (i == 0 || to_compress[i].first > to_compress[i - 1].first) curr++;       a[to_compress[i].second.first][to_compress[i].second.second] = curr;     }   }   void solve() {     for (int i = 1; i <= n; i++) {       int x = LIS.get(a[i][2]) + 1;       maximize(ans, x);       LIS.update(a[i][1], x);     }     printf( %d , ans);   }   int main() {     compress();     solve();   }   