import numpy as np

import sys

input = sys.stdin.readline



N, M, Q = list(map(int, input().split()))

city = np.zeros((N + 2, N + 1), dtype=np.int)



for _ in range(M):

    L, R = list(map(int, input().split()))

    city[L][R] += 1



np.cumsum(city, axis=0, out=city)

np.cumsum(city, axis=1, out=city)



for _ in range(Q):

    p, q = list(map(int, input().split()))

    print((city[q][q] - city[q][p - 1] - city[p - 1][q] + city[p - 1][p - 1]))
import numpy as np

import sys

readlines = sys.stdin.readlines()



N, M, Q = list(map(int, readlines[0].split()))

city = np.zeros((N + 2, N + 1), dtype=int)

L, R = np.array([i.split() for i in readlines[1:M + 1]], dtype=int).T

pq = [list(map(int, i.split())) for i in readlines[M + 1:]]



np.add.at(city, (L, R), 1)

np.cumsum(city, axis=0, out=city)

np.cumsum(city, axis=1, out=city)



for p, q in pq:

    print((city[q][q] - city[q][p - 1] - city[p - 1][q] + city[p - 1][p - 1]))
import numpy as np
import sys

input = sys.stdin.readline
N, M, Q = list(map(int, input().split()))
city = np.zeros((N + 2, N + 1), dtype=np.int)
for _ in range(M):
    L, R = list(map(int, input().split()))
    city[L][R] += 1
np.cumsum(city, axis=0, out=city)
np.cumsum(city, axis=1, out=city)
for _ in range(Q):
    p, q = list(map(int, input().split()))
    print((city[q][q] - city[q][p - 1] - city[p - 1][q] + city[p - 1][p - 1]))

import numpy as np
import sys

readlines = sys.stdin.readlines()
N, M, Q = list(map(int, readlines[0].split()))
city = np.zeros((N + 2, N + 1), dtype=int)
L, R = np.array([i.split() for i in readlines[1 : M + 1]], dtype=int).T
pq = [list(map(int, i.split())) for i in readlines[M + 1 :]]
np.add.at(city, (L, R), 1)
np.cumsum(city, axis=0, out=city)
np.cumsum(city, axis=1, out=city)
for p, q in pq:
    print((city[q][q] - city[q][p - 1] - city[p - 1][q] + city[p - 1][p - 1]))

-input = sys.stdin.readline -N, M, Q = list(map(int, input().split())) -city = np.zeros((N + 2, N + 1), dtype=np.int) -for _ in range(M): -    L, R = list(map(int, input().split())) -    city[L][R] += 1 +readlines = sys.stdin.readlines() +N, M, Q = list(map(int, readlines[0].split())) +city = np.zeros((N + 2, N + 1), dtype=int) +L, R = np.array([i.split() for i in readlines[1 : M + 1]], dtype=int).T +pq = [list(map(int, i.split())) for i in readlines[M + 1 :]] +np.add.at(city, (L, R), 1) -for _ in range(Q): -    p, q = list(map(int, input().split())) +for p, q in pq: