func_code_string: #include <bits/stdc++.h>   using namespace std;   template <class T>   inline T SQR(T x) {     return x * x;   }   template <class T>   inline string TOSTR(const T &x) {     stringstream ss;     ss << x;     return ss.str();   }   template <class T>   void UPDATE_MIN(T &x, T y) {     if (y < x) {       x = y;     }   }   template <class T>   void UPDATE_MAX(T &x, T y) {     if (x < y) {       x = y;     }   }   int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }   long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }   long long powmod(long long a, long long p, long long m) {     long long r = 1;     while (p) {       if (p & 1) r = r * a % m;       p >>= 1;       a = a * a % m;     }     return r;   }   template <typename K, typename V>   V GetWithDef(const std::unordered_map<K, V> &m, const K &key, const V &defval) {     auto it = m.find(key);     if (it == m.end()) {       return defval;     } else {       return it->second;     }   }   template <typename K, typename V>   void SetDef(std::unordered_map<K, V> &m, const K &key, const V &defval) {     auto it = m.find(key);     if (it == m.end()) m[key] = defval;   }   const int MOD = 1000 * 1000 * 1000 + 7;   const double PI = 3.1415926535897932384626433832795l;   struct Event {     int id;     long long x;     char type;     bool operator<(const Event &other) const {       if (x < other.x) return true;       if (x > other.x) return false;       return type < other.type;     }   };   Event events[2 * 200123];   int saved_max[200123];   int evtop = 0;   int N;   int main() {     ios_base::sync_with_stdio(0);     cin >> N;     for (int(i) = 0; (i) < (int)(N); (i)++) {       int x, w;       cin >> x >> w;       events[evtop++] = {i, x - w, 1};       events[evtop++] = {i, x + w, 0};     }     sort(events, events + evtop);     int max_cur_closed = 0;     for (int(i) = 0; (i) < (int)(evtop); (i)++) {       Event &e = events[i];       if (e.type == 1) {         saved_max[e.id] = max_cur_closed;       } else if (e.type == 0) {         UPDATE_MAX(max_cur_closed, saved_max[e.id] + 1);       } else         assert(0);     }     cout << max_cur_closed << endl;     return 0;   }   