

import numpy as np



def resolve():

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

    S = np.zeros(((N + 1), (N + 1)))

    for _ in range(M):

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

        # L,Rの区間にある本数

        S[l, r] += 1



    # ゼータ変換（横縦累積和） axis=1:横, axis=0:縦

    S = np.cumsum(S, axis=1).cumsum(axis=0)



    for _ in range(Q):

        ans = 0

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

        l -= 1

        ans = S[r, r] - S[l, r] - S[r, l] + S[l, l]

        print((int(ans)))





if __name__ == "__main__":

    resolve()


import numpy as np



def resolve():

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

    L, R = np.array([list(map(int, input().split())) for _ in range(M)]).T

    P, Q = np.array([list(map(int, input().split())) for _ in range(Q)]).T

    P -= 1

    S = np.zeros(((N + 1), (N + 1)))



    # L,Rの区間にある本数

    np.add.at(S, (L,R), 1)



    # ゼータ変換（横縦累積和） axis=1:横, axis=0:縦

    S = np.cumsum(S, axis=1).cumsum(axis=0)



    ans = S[P, P] - S[P, Q] - S[Q, P] + S[Q, Q]

    print(*ans.astype(int), sep="\n")



if __name__ == "__main__":

    resolve()

import numpy as np


def resolve():
    N, M, Q = list(map(int, input().split()))
    S = np.zeros(((N + 1), (N + 1)))
    for _ in range(M):
        l, r = list(map(int, input().split()))
        # L,Rの区間にある本数
        S[l, r] += 1
    # ゼータ変換（横縦累積和） axis=1:横, axis=0:縦
    S = np.cumsum(S, axis=1).cumsum(axis=0)
    for _ in range(Q):
        ans = 0
        l, r = list(map(int, input().split()))
        l -= 1
        ans = S[r, r] - S[l, r] - S[r, l] + S[l, l]
        print((int(ans)))


if __name__ == "__main__":
    resolve()

import numpy as np


def resolve():
    N, M, Q = map(int, input().split())
    L, R = np.array([list(map(int, input().split())) for _ in range(M)]).T
    P, Q = np.array([list(map(int, input().split())) for _ in range(Q)]).T
    P -= 1
    S = np.zeros(((N + 1), (N + 1)))
    # L,Rの区間にある本数
    np.add.at(S, (L, R), 1)
    # ゼータ変換（横縦累積和） axis=1:横, axis=0:縦
    S = np.cumsum(S, axis=1).cumsum(axis=0)
    ans = S[P, P] - S[P, Q] - S[Q, P] + S[Q, Q]
    print(*ans.astype(int), sep="\n")


if __name__ == "__main__":
    resolve()

-    N, M, Q = list(map(int, input().split())) +    N, M, Q = map(int, input().split()) +    L, R = np.array([list(map(int, input().split())) for _ in range(M)]).T +    P, Q = np.array([list(map(int, input().split())) for _ in range(Q)]).T +    P -= 1 -    for _ in range(M): -        l, r = list(map(int, input().split())) -        # L,Rの区間にある本数 -        S[l, r] += 1 +    # L,Rの区間にある本数 +    np.add.at(S, (L, R), 1) -    for _ in range(Q): -        ans = 0 -        l, r = list(map(int, input().split())) -        l -= 1 -        ans = S[r, r] - S[l, r] - S[r, l] + S[l, l] -        print((int(ans))) +    ans = S[P, P] - S[P, Q] - S[Q, P] + S[Q, Q] +    print(*ans.astype(int), sep="\n")