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

src = [tuple(map(int,input().split())) for i in range(M)]

qs = [tuple(map(int,input().split())) for i in range(Q)]



imos = [[0]*(N+1) for i in range(N+1)]

for l,r in src:

    imos[l][r] += 1



for i in range(N+1):

    for j in range(N):

        imos[i][j+1] += imos[i][j]

for i in range(N):

    for j in range(N+1):

        imos[i+1][j] += imos[i][j]



for p,q in qs:

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

    print(ans)
import sys

input = sys.stdin.readline

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

LR = [tuple(map(int,input().split())) for i in range(M)]

PQ = [tuple(map(int,input().split())) for i in range(Q)]



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

for l,r in LR:

    imos[l][r] += 1

for i in range(N+1):

    for j in range(N):

        imos[i][j+1] += imos[i][j]

for j in range(N+1):

    for i in range(N):

        imos[i+1][j] += imos[i][j]



ans = []

for p,q in PQ:

    p -= 1

    a = imos[q][q] + imos[p][p] - imos[p][q] - imos[q][p]

    ans.append(a)

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

N, M, Q = list(map(int, input().split()))
src = [tuple(map(int, input().split())) for i in range(M)]
qs = [tuple(map(int, input().split())) for i in range(Q)]
imos = [[0] * (N + 1) for i in range(N + 1)]
for l, r in src:
    imos[l][r] += 1
for i in range(N + 1):
    for j in range(N):
        imos[i][j + 1] += imos[i][j]
for i in range(N):
    for j in range(N + 1):
        imos[i + 1][j] += imos[i][j]
for p, q in qs:
    ans = imos[p - 1][p - 1] + imos[q][q] - imos[p - 1][q] - imos[q][p - 1]
    print(ans)

import sys

input = sys.stdin.readline
N, M, Q = map(int, input().split())
LR = [tuple(map(int, input().split())) for i in range(M)]
PQ = [tuple(map(int, input().split())) for i in range(Q)]
imos = [[0] * (N + 1) for _ in range(N + 1)]
for l, r in LR:
    imos[l][r] += 1
for i in range(N + 1):
    for j in range(N):
        imos[i][j + 1] += imos[i][j]
for j in range(N + 1):
    for i in range(N):
        imos[i + 1][j] += imos[i][j]
ans = []
for p, q in PQ:
    p -= 1
    a = imos[q][q] + imos[p][p] - imos[p][q] - imos[q][p]
    ans.append(a)
print(*ans, sep="\n")

-N, M, Q = list(map(int, input().split())) -src = [tuple(map(int, input().split())) for i in range(M)] -qs = [tuple(map(int, input().split())) for i in range(Q)] -imos = [[0] * (N + 1) for i in range(N + 1)] -for l, r in src: +import sys + +input = sys.stdin.readline +N, M, Q = map(int, input().split()) +LR = [tuple(map(int, input().split())) for i in range(M)] +PQ = [tuple(map(int, input().split())) for i in range(Q)] +imos = [[0] * (N + 1) for _ in range(N + 1)] +for l, r in LR: -for i in range(N): -    for j in range(N + 1): +for j in range(N + 1): +    for i in range(N): -for p, q in qs: -    ans = imos[p - 1][p - 1] + imos[q][q] - imos[p - 1][q] - imos[q][p - 1] -    print(ans) +ans = [] +for p, q in PQ: +    p -= 1 +    a = imos[q][q] + imos[p][p] - imos[p][q] - imos[q][p] +    ans.append(a) +print(*ans, sep="\n")