import numpy as np



N, M, K = map(int, input().split())



LR = np.zeros(shape=(N + 1, N + 1), dtype=np.int32)

L, R = np.array([input().split() for _ in range(M)], dtype=np.int32).T

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



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

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



ans = []

for _ in range(K):

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

    p -= 1

    ans.append(LR[q, q] - LR[p, q] - LR[q, p] + LR[p, p])



print(*ans, sep='\n')

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



A = [[0] * (N + 1) for _ in range(N + 1)]

for _ in range(M):

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

    A[L][R] += 1



for i in range(1, N + 1):

    for j in range(1, N + 1):

        A[i][j] += A[i][j - 1]

for j in range(1, N + 1):

    for i in range(1, N + 1):

        A[i][j] += A[i - 1][j]



ans = []

for _ in range(Q):

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

    p -= 1

    ans.append(A[q][q] - A[q][p] - A[p][q] + A[p][p])

print(*ans, sep='\n')

import numpy as np

N, M, K = map(int, input().split())
LR = np.zeros(shape=(N + 1, N + 1), dtype=np.int32)
L, R = np.array([input().split() for _ in range(M)], dtype=np.int32).T
np.add.at(LR, (L, R), 1)
np.cumsum(LR, axis=0, out=LR)
np.cumsum(LR, axis=1, out=LR)
ans = []
for _ in range(K):
    p, q = map(int, input().split())
    p -= 1
    ans.append(LR[q, q] - LR[p, q] - LR[q, p] + LR[p, p])
print(*ans, sep="\n")

N, M, Q = map(int, input().split())
A = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    L, R = map(int, input().split())
    A[L][R] += 1
for i in range(1, N + 1):
    for j in range(1, N + 1):
        A[i][j] += A[i][j - 1]
for j in range(1, N + 1):
    for i in range(1, N + 1):
        A[i][j] += A[i - 1][j]
ans = []
for _ in range(Q):
    p, q = map(int, input().split())
    p -= 1
    ans.append(A[q][q] - A[q][p] - A[p][q] + A[p][p])
print(*ans, sep="\n")

-import numpy as np - -N, M, K = map(int, input().split()) -LR = np.zeros(shape=(N + 1, N + 1), dtype=np.int32) -L, R = np.array([input().split() for _ in range(M)], dtype=np.int32).T -np.add.at(LR, (L, R), 1) -np.cumsum(LR, axis=0, out=LR) -np.cumsum(LR, axis=1, out=LR) +N, M, Q = map(int, input().split()) +A = [[0] * (N + 1) for _ in range(N + 1)] +for _ in range(M): +    L, R = map(int, input().split()) +    A[L][R] += 1 +for i in range(1, N + 1): +    for j in range(1, N + 1): +        A[i][j] += A[i][j - 1] +for j in range(1, N + 1): +    for i in range(1, N + 1): +        A[i][j] += A[i - 1][j] -for _ in range(K): +for _ in range(Q): -    ans.append(LR[q, q] - LR[p, q] - LR[q, p] + LR[p, p]) +    ans.append(A[q][q] - A[q][p] - A[p][q] + A[p][p])