from sys import stdin

#from pprint import pprint

input = stdin.readline



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



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

for i in range(M):

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

    count[l][r] += 1

# pprint(count)



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

for i in range(N+1):

    accum[i][0] = count[i][0]

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

        accum[i][j] = accum[i][j-1] + count[i][j]

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

    for j in range(N+1):

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

# pprint(accum)



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

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

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

        test[i][j] = accum[j][j] - accum[i-1][j] - \

            accum[j][i-1] + accum[i-1][i-1]

# pprint(test)





for _ in range(Q):

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

    ans = accum[q][q] - accum[p-1][q] - accum[q][p-1] + accum[p-1][p-1]

    print(ans)

from sys import stdin

from itertools import accumulate

from pprint import pprint

input = stdin.readline



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



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

for i in range(M):

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

    count[l][r] += 1

# pprint(count)



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

#for i in range(N+1):

#    accum[i][0] = count[i][0]

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

#        accum[i][j] = accum[i][j-1] + count[i][j]

#pprint(accum)

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

#    for j in range(N+1):

#        accum[i][j] = accum[i-1][j] + accum[i][j]

#pprint(accum)

accum = list(zip(*[list(accumulate(d)) for d in zip(*(accumulate(c) for c in count))]))

#pprint(accum)



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

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

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

#        test[i][j] = accum[j][j] - accum[i-1][j] - \

#            accum[j][i-1] + accum[i-1][i-1]

# pprint(test)





for _ in range(Q):

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

    ans = accum[q][q] - accum[p-1][q] - accum[q][p-1] + accum[p-1][p-1]

    print(ans)

from sys import stdin

# from pprint import pprint
input = stdin.readline
N, M, Q = map(int, input().split())
count = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(M):
    l, r = map(int, input().split())
    count[l][r] += 1
# pprint(count)
accum = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(N + 1):
    accum[i][0] = count[i][0]
    for j in range(1, N + 1):
        accum[i][j] = accum[i][j - 1] + count[i][j]
for i in range(1, N + 1):
    for j in range(N + 1):
        accum[i][j] = accum[i - 1][j] + accum[i][j]
# pprint(accum)
test = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(1, N + 1):
    for j in range(1, N + 1):
        test[i][j] = (
            accum[j][j] - accum[i - 1][j] - accum[j][i - 1] + accum[i - 1][i - 1]
        )
# pprint(test)
for _ in range(Q):
    p, q = map(int, input().split())
    ans = accum[q][q] - accum[p - 1][q] - accum[q][p - 1] + accum[p - 1][p - 1]
    print(ans)

from sys import stdin
from itertools import accumulate
from pprint import pprint

input = stdin.readline
N, M, Q = list(map(int, input().split()))
count = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(M):
    l, r = list(map(int, input().split()))
    count[l][r] += 1
# pprint(count)
# accum = [[0]*(N+1) for _ in range(N+1)]
# for i in range(N+1):
#    accum[i][0] = count[i][0]
#    for j in range(1, N+1):
#        accum[i][j] = accum[i][j-1] + count[i][j]
# pprint(accum)
# for i in range(1, N+1):
#    for j in range(N+1):
#        accum[i][j] = accum[i-1][j] + accum[i][j]
# pprint(accum)
accum = list(zip(*[list(accumulate(d)) for d in zip(*(accumulate(c) for c in count))]))
# pprint(accum)
# test = [[0]*(N+1) for _ in range(N+1)]
# for i in range(1, N+1):
#    for j in range(1, N+1):
#        test[i][j] = accum[j][j] - accum[i-1][j] - \
#            accum[j][i-1] + accum[i-1][i-1]
# pprint(test)
for _ in range(Q):
    p, q = list(map(int, input().split()))
    ans = accum[q][q] - accum[p - 1][q] - accum[q][p - 1] + accum[p - 1][p - 1]
    print(ans)

+from itertools import accumulate +from pprint import pprint -# from pprint import pprint -N, M, Q = map(int, input().split()) +N, M, Q = list(map(int, input().split())) -    l, r = map(int, input().split()) +    l, r = list(map(int, input().split())) -accum = [[0] * (N + 1) for _ in range(N + 1)] -for i in range(N + 1): -    accum[i][0] = count[i][0] -    for j in range(1, N + 1): -        accum[i][j] = accum[i][j - 1] + count[i][j] -for i in range(1, N + 1): -    for j in range(N + 1): -        accum[i][j] = accum[i - 1][j] + accum[i][j] +# accum = [[0]*(N+1) for _ in range(N+1)] +# for i in range(N+1): +#    accum[i][0] = count[i][0] +#    for j in range(1, N+1): +#        accum[i][j] = accum[i][j-1] + count[i][j] -test = [[0] * (N + 1) for _ in range(N + 1)] -for i in range(1, N + 1): -    for j in range(1, N + 1): -        test[i][j] = ( -            accum[j][j] - accum[i - 1][j] - accum[j][i - 1] + accum[i - 1][i - 1] -        ) +# for i in range(1, N+1): +#    for j in range(N+1): +#        accum[i][j] = accum[i-1][j] + accum[i][j] +# pprint(accum) +accum = list(zip(*[list(accumulate(d)) for d in zip(*(accumulate(c) for c in count))])) +# pprint(accum) +# test = [[0]*(N+1) for _ in range(N+1)] +# for i in range(1, N+1): +#    for j in range(1, N+1): +#        test[i][j] = accum[j][j] - accum[i-1][j] - \ +#            accum[j][i-1] + accum[i-1][i-1] -    p, q = map(int, input().split()) +    p, q = list(map(int, input().split()))