#include <bits/stdc++.h>   int a[200003], b[200003], f[200003];   int main() {     int n, m, q;     scanf( %d%d%d , &n, &m, &q);     int i, l, h;     for (i = 0; i < n; i++) {       scanf( %d%d , &l, &h);       a[l]++;       a[h + 1]--;     }     int sum = 0, co = 0;     for (i = 0; i <= 200000; i++) {       if (a[i] != 0) sum += a[i];       a[i] = sum;       if (a[i] >= m) {         co++;         f[i] = 1;       }       b[i] = co;     }     for (i = 0; i < q; i++) {       scanf( %d%d , &l, &h);       if (f[l] == 1)         printf( %d n , b[h] - b[l] + 1);       else         printf( %d n , b[h] - b[l]);     }     return 0;   }   