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

readlines = sys.stdin.readlines()



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

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

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

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



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

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

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



p -= 1

answer = city[q, q] - city[p, q] - city[q, p] + city[p, p]

print(('\n'.join(answer.astype(str))))
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

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

-city = np.zeros((N + 2, N + 1), dtype=int) +city = np.zeros((N + 1, N + 1), dtype=int) -pq = [list(map(int, i.split())) for i in readlines[M + 1 :]] +p, q = np.array([i.split() for i in readlines[M + 1 :]], dtype=int).T -for p, q in pq: -    print((city[q][q] - city[q][p - 1] - city[p - 1][q] + city[p - 1][p - 1])) +p -= 1 +answer = city[q, q] - city[p, q] - city[q, p] + city[p, p] +print(("\n".join(answer.astype(str))))