func_code_string: #include <bits/stdc++.h>   using namespace std;   long long x, y;   int n;   pair<long long, long long> a[200001];   vector<long long> numbers;   map<long long, int> matchs;   long long matchsReverse[400001];   int increase[400001];   int decrease[400001];   long long answer[400001];   int main() {     cin >> n;     for (int i = 0; i < n; i++) {       cin >> x >> y;       a[i] = make_pair(x, y);       numbers.push_back(x);       numbers.push_back(y);     }     sort(numbers.begin(), numbers.end());     int last = -1, num = 0;     for (int i = 0; i < numbers.size(); i++) {       if (last != numbers[i]) {         num++;         matchs[numbers[i]] = num;         matchsReverse[num] = numbers[i];         last = numbers[i];       }     }     for (int i = 0; i < n; i++) {       a[i] = make_pair(matchs[a[i].first], matchs[a[i].second]);       increase[a[i].first]++;       decrease[a[i].second]++;     }     long long cnt = 0;     for (int i = 1; i <= 400000; i++) {       answer[cnt] += matchsReverse[i] - 1 - matchsReverse[i - 1];       answer[cnt + increase[i]]++;       cnt += increase[i];       cnt -= decrease[i];     }     for (int i = 1; i <= n; i++) cout << answer[i] <<    ;   }   