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



Section = [[0]*N for _ in range(N)]

for _ in range(M):

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

    Section[L-1][R-1] += 1



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

for i in range(N):

    for j in range(N):

        Sum[i+1][j+1] = Sum[i][j+1]+Sum[i+1][j]-Sum[i][j]+Section[i][j]



Ans = [[0]*N for _ in range(N)]

for i in range(N):

    for j in range(i,N):

        Ans[i][j] = Sum[j+1][j+1]-Sum[i][j+1]



for _ in range(Q):

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

    print((Ans[p-1][q-1]))
import sys

s = sys.stdin.readlines()

N,M,Q = list(map(int,s[0].split()))



Section = [[0]*N for _ in range(N)]

for L,R in (list(map(int, e.split())) for e in s[1:M+1]):

    Section[L-1][R-1] += 1



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

for i in range(N):

    for j in range(N):

        Sum[i+1][j+1] = Sum[i][j+1]+Sum[i+1][j]-Sum[i][j]+Section[i][j]



Ans = [[0]*N for _ in range(N)]

for i in range(N):

    for j in range(i,N):

        Ans[i][j] = Sum[j+1][j+1]-Sum[i][j+1]



for p,q in (list(map(int, e.split())) for e in s[M+1:]):

    print((Ans[p-1][q-1]))
N, M, Q = list(map(int, input().split()))
Section = [[0] * N for _ in range(N)]
for _ in range(M):
    L, R = list(map(int, input().split()))
    Section[L - 1][R - 1] += 1
Sum = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(N):
    for j in range(N):
        Sum[i + 1][j + 1] = Sum[i][j + 1] + Sum[i + 1][j] - Sum[i][j] + Section[i][j]
Ans = [[0] * N for _ in range(N)]
for i in range(N):
    for j in range(i, N):
        Ans[i][j] = Sum[j + 1][j + 1] - Sum[i][j + 1]
for _ in range(Q):
    p, q = list(map(int, input().split()))
    print((Ans[p - 1][q - 1]))

import sys

s = sys.stdin.readlines()
N, M, Q = list(map(int, s[0].split()))
Section = [[0] * N for _ in range(N)]
for L, R in (list(map(int, e.split())) for e in s[1 : M + 1]):
    Section[L - 1][R - 1] += 1
Sum = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(N):
    for j in range(N):
        Sum[i + 1][j + 1] = Sum[i][j + 1] + Sum[i + 1][j] - Sum[i][j] + Section[i][j]
Ans = [[0] * N for _ in range(N)]
for i in range(N):
    for j in range(i, N):
        Ans[i][j] = Sum[j + 1][j + 1] - Sum[i][j + 1]
for p, q in (list(map(int, e.split())) for e in s[M + 1 :]):
    print((Ans[p - 1][q - 1]))

-N, M, Q = list(map(int, input().split())) +import sys + +s = sys.stdin.readlines() +N, M, Q = list(map(int, s[0].split())) -for _ in range(M): -    L, R = list(map(int, input().split())) +for L, R in (list(map(int, e.split())) for e in s[1 : M + 1]): -for _ in range(Q): -    p, q = list(map(int, input().split())) +for p, q in (list(map(int, e.split())) for e in s[M + 1 :]):