func_code_string: #include <bits/stdc++.h>   using namespace std;   unordered_map<long long, int> mpSt;   unordered_map<long long, int> mpEnd;   set<long long> AllPoints;   long long K[200005];   int main() {     int N;     scanf( %d , &N);     for (int i = 0; i < N; i++) {       long long st, end;       scanf(  %lld %lld , &st, &end);       AllPoints.insert(st);       AllPoints.insert(end);       if (mpSt.count(st) > 0)         mpSt[st]++;       else         mpSt[st] = 1;       if (mpEnd.count(end) > 0)         mpEnd[end]++;       else         mpEnd[end] = 1;     }     if (N == 1) {       if (AllPoints.size() == 1) {         printf( 1 );       } else {         long long seg = *next(AllPoints.begin()) - *AllPoints.begin() + 1;         printf( %lld , seg);       }       return 0;     }     auto nextIt = next(AllPoints.begin());     long long cumulative = 0;     for (auto it = AllPoints.begin(); nextIt != AllPoints.end(); it++) {       long long cur = *it;       long long nxt = *nextIt;       cumulative += mpSt[cur];       K[cumulative] += 1;       cumulative -= mpEnd[cur];       long long middle = nxt - cur - 1;       K[cumulative] += middle;       nextIt = next(nextIt);     }     cumulative += mpSt[*prev(AllPoints.end())];     K[cumulative]++;     for (int i = 1; i <= N; i++) {       printf( %lld  , K[i]);     }     return 0;   }   