func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 1e6 + 10;   const long long inf = 1e15;   const int mod = 1e6;   void faster() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);   }   const long long N = 3e5 + 10;   int n, m;   string s;   pair<long long, long long> p[N];   long long prefix[N];   int main() {     faster();     int n;     cin >> n;     prefix[0] = 1;     for (int i = 0; i < n; i++) {       cin >> p[i].first >> p[i].second;     }     sort(p, p + n);     long long mini = p[0].first;     long long maxi = prefix[0];     for (int i = 1; i < n; i++) {       if (p[i].first - p[i].second >= mini) {         auto q = lower_bound(p, p + i, make_pair(p[i].first - p[i].second, 0ll));         q--;         int ind = q - p;         prefix[i] = prefix[ind] + 1;       } else         prefix[i] = 1;       maxi = max(maxi, prefix[i]);     }     cout << n - maxi << endl;   }   