import numpy as np

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



#input

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

for _ in range(M):

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

    lst[R][L] += 1



lst = np.array(lst)

# print (lst)



#2次元累積和

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

    lst[:,i] += lst[:, i - 1]

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

    lst[j,:] += lst[j - 1, :]





#output

for _ in range(Q):

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

    print((lst[q, q] - lst[p-1, q] - lst[q, p-1] + lst[p-1, p-1]))



# print (lst)

n,m,q=list(map(int,input().split()))

atlas=[[0]*(n+1) for _ in range(n+1)]

for _ in range(m):

    l,r=list(map(int,input().split()))

    atlas[l][r] +=1

for i in range(n+1):

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

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



for i in range(n+1):

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

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



for p,q in [list(map(int,input().split())) for _ in range(q)]:

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

N, M, Q = list(map(int, input().split()))
# input
lst = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    L, R = list(map(int, input().split()))
    lst[R][L] += 1
lst = np.array(lst)
# print (lst)
# 2次元累積和
for i in range(1, N + 1):
    lst[:, i] += lst[:, i - 1]
for j in range(1, N + 1):
    lst[j, :] += lst[j - 1, :]
# output
for _ in range(Q):
    p, q = list(map(int, input().split()))
    print((lst[q, q] - lst[p - 1, q] - lst[q, p - 1] + lst[p - 1, p - 1]))
# print (lst)

n, m, q = list(map(int, input().split()))
atlas = [[0] * (n + 1) for _ in range(n + 1)]
for _ in range(m):
    l, r = list(map(int, input().split()))
    atlas[l][r] += 1
for i in range(n + 1):
    for j in range(1, n + 1):
        atlas[i][j] += atlas[i][j - 1]
for i in range(n + 1):
    for j in range(1, n + 1):
        atlas[i][j] += atlas[i - 1][j]
for p, q in [list(map(int, input().split())) for _ in range(q)]:
    print((atlas[q][q] - atlas[q][p - 1] - atlas[p - 1][q] + atlas[p - 1][p - 1]))

-import numpy as np - -N, M, Q = list(map(int, input().split())) -# input -lst = [[0] * (N + 1) for _ in range(N + 1)] -for _ in range(M): -    L, R = list(map(int, input().split())) -    lst[R][L] += 1 -lst = np.array(lst) -# print (lst) -# 2次元累積和 -for i in range(1, N + 1): -    lst[:, i] += lst[:, i - 1] -for j in range(1, N + 1): -    lst[j, :] += lst[j - 1, :] -# output -for _ in range(Q): -    p, q = list(map(int, input().split())) -    print((lst[q, q] - lst[p - 1, q] - lst[q, p - 1] + lst[p - 1, p - 1])) -# print (lst) +n, m, q = list(map(int, input().split())) +atlas = [[0] * (n + 1) for _ in range(n + 1)] +for _ in range(m): +    l, r = list(map(int, input().split())) +    atlas[l][r] += 1 +for i in range(n + 1): +    for j in range(1, n + 1): +        atlas[i][j] += atlas[i][j - 1] +for i in range(n + 1): +    for j in range(1, n + 1): +        atlas[i][j] += atlas[i - 1][j] +for p, q in [list(map(int, input().split())) for _ in range(q)]: +    print((atlas[q][q] - atlas[q][p - 1] - atlas[p - 1][q] + atlas[p - 1][p - 1]))