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

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

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



City = [[0]*N for i in range(N)]

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



for train in Train:

  City[train[0]-1][train[1]-1] += 1



for i in range(N):

  for j in range(N):

    Accum[i+1][j+1] = Accum[i+1][j] + City[i][j]

for j in range(N):

  for i in range(N):

    Accum[i+1][j+1] += Accum[i][j+1]



for query in Query:

  print((

    Accum[query[1]][query[1]]

  - Accum[query[1]][query[0]-1]

  - Accum[query[0]-1][query[1]]

  + Accum[query[0]-1][query[0]-1]

    ))
import sys

input = sys.stdin.readline



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



D = [[0 for j in range(N)] for i in range(N)]



for _ in range(M):

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

    D[l - 1][r - 1] += 1



for i in range(N):

    for j in range(1, N):

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



for j in range(N):

    for i in range(N - 1)[::-1]:

        D[i][j] += D[i + 1][j]



for _ in range(Q):

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

    print((D[p - 1][q - 1]))
N, M, Q = list(map(int, input().split()))
Train = [list(map(int, input().split())) for i in range(M)]
Query = [list(map(int, input().split())) for i in range(Q)]
City = [[0] * N for i in range(N)]
Accum = [[0] * (N + 1) for i in range(N + 1)]
for train in Train:
    City[train[0] - 1][train[1] - 1] += 1
for i in range(N):
    for j in range(N):
        Accum[i + 1][j + 1] = Accum[i + 1][j] + City[i][j]
for j in range(N):
    for i in range(N):
        Accum[i + 1][j + 1] += Accum[i][j + 1]
for query in Query:
    print(
        (
            Accum[query[1]][query[1]]
            - Accum[query[1]][query[0] - 1]
            - Accum[query[0] - 1][query[1]]
            + Accum[query[0] - 1][query[0] - 1]
        )
    )

import sys

input = sys.stdin.readline
N, M, Q = list(map(int, input().split()))
D = [[0 for j in range(N)] for i in range(N)]
for _ in range(M):
    l, r = list(map(int, input().split()))
    D[l - 1][r - 1] += 1
for i in range(N):
    for j in range(1, N):
        D[i][j] += D[i][j - 1]
for j in range(N):
    for i in range(N - 1)[::-1]:
        D[i][j] += D[i + 1][j]
for _ in range(Q):
    p, q = list(map(int, input().split()))
    print((D[p - 1][q - 1]))

+import sys + +input = sys.stdin.readline -Train = [list(map(int, input().split())) for i in range(M)] -Query = [list(map(int, input().split())) for i in range(Q)] -City = [[0] * N for i in range(N)] -Accum = [[0] * (N + 1) for i in range(N + 1)] -for train in Train: -    City[train[0] - 1][train[1] - 1] += 1 +D = [[0 for j in range(N)] for i in range(N)] +for _ in range(M): +    l, r = list(map(int, input().split())) +    D[l - 1][r - 1] += 1 -    for j in range(N): -        Accum[i + 1][j + 1] = Accum[i + 1][j] + City[i][j] +    for j in range(1, N): +        D[i][j] += D[i][j - 1] -    for i in range(N): -        Accum[i + 1][j + 1] += Accum[i][j + 1] -for query in Query: -    print( -        ( -            Accum[query[1]][query[1]] -            - Accum[query[1]][query[0] - 1] -            - Accum[query[0] - 1][query[1]] -            + Accum[query[0] - 1][query[0] - 1] -        ) -    ) +    for i in range(N - 1)[::-1]: +        D[i][j] += D[i + 1][j] +for _ in range(Q): +    p, q = list(map(int, input().split())) +    print((D[p - 1][q - 1]))