func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 2e5 + 100;   int fen[maxn * 2], d[maxn], n, first[maxn], w[maxn];   pair<int, int> p[maxn];   int N = 1;   map<int, int> mp;   vector<int> v;   inline void upd(int first, int val) {     for (int i = first; i < N; i += i & -i) fen[i] = max(fen[i], val);   }   inline int ask(int first) {     int res = 0;     for (int i = first; i > 0; i -= i & -i) res = max(res, fen[i]);     return res;   }   int main() {     ios_base::sync_with_stdio(false);     cin >> n;     for (int(i) = (0); (i) < (n); ++(i)) cin >> p[i].first >> p[i].second;     sort(p, p + n);     for (int(i) = (0); (i) < (n); ++(i)) {       first[i] = p[i].first, w[i] = p[i].second;       v.push_back(first[i] + w[i]);       v.push_back(first[i] - w[i]);     }     sort(v.begin(), v.end());     v.resize(unique(v.begin(), v.end()) - v.begin());     for (auto &(a) : (v)) mp[a] = N++;     int ans = 1;     for (int(i) = (0); (i) < (n); ++(i)) {       d[i] = 1 + ask(mp[first[i] - w[i]]);       upd(mp[first[i] + w[i]], d[i]);       ans = max(ans, d[i]);     }     cout << ans << endl;   }   