func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, dd, q;     cin >> n >> dd >> q;     int arr[200001];     for (int i = 0; i < 200001; i++) {       arr[i] = 0;     }     for (int h = 0; h < n; h++) {       int t1, t2;       cin >> t1 >> t2;       arr[t1]++;       arr[t2 + 1]--;     }     int count = 0;     for (int k = 0; k < 200001; k++) {       count += arr[k];       arr[k] = count;     }     count = 0;     int ans[200001];     for (int k = 0; k <= 200000; k++) {       if (arr[k] >= dd) {         count++;       }       ans[k] = count;     }     for (int kk = 0; kk < q; kk++) {       int r1, r2;       cin >> r1 >> r2;       cout << ans[r2] - ans[r1 - 1] << endl;     }     return 0;   }   