# import sys

import numpy as np

# input = sys.stdin.readline



def main():

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



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



    for i in range(M):

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

        check[r][l] += 1



    # print(check)

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

        check[i] += check[i-1]

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

        check[:,i] += check[:,i-1]

    # print(check)



    for i in range(Q):

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

        print((int(check[q][q] - check[q][p-1] - check[p-1][q] + check[p-1][p-1])))



if __name__ == "__main__":

    main()

import sys

import numpy as np

input = sys.stdin.readline



def main():

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



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



    for i in range(M):

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

        check[r][l] += 1



    # print(check)

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

        check[i] += check[i-1]

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

        check[:,i] += check[:,i-1]

    # print(check)



    for i in range(Q):

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

        print((int(check[q][q] - check[q][p-1] - check[p-1][q] + check[p-1][p-1])))



if __name__ == "__main__":

    main()

# import sys
import numpy as np

# input = sys.stdin.readline
def main():
    N, M, Q = list(map(int, input().split()))
    check = np.zeros((N + 1, N + 1))
    for i in range(M):
        l, r = list(map(int, input().split()))
        check[r][l] += 1
    # print(check)
    for i in range(1, N + 1):
        check[i] += check[i - 1]
    for i in range(1, N + 1):
        check[:, i] += check[:, i - 1]
    # print(check)
    for i in range(Q):
        p, q = list(map(int, input().split()))
        print(
            (int(check[q][q] - check[q][p - 1] - check[p - 1][q] + check[p - 1][p - 1]))
        )


if __name__ == "__main__":
    main()

import sys
import numpy as np

input = sys.stdin.readline


def main():
    N, M, Q = list(map(int, input().split()))
    check = np.zeros((N + 1, N + 1))
    for i in range(M):
        l, r = list(map(int, input().split()))
        check[r][l] += 1
    # print(check)
    for i in range(1, N + 1):
        check[i] += check[i - 1]
    for i in range(1, N + 1):
        check[:, i] += check[:, i - 1]
    # print(check)
    for i in range(Q):
        p, q = list(map(int, input().split()))
        print(
            (int(check[q][q] - check[q][p - 1] - check[p - 1][q] + check[p - 1][p - 1]))
        )


if __name__ == "__main__":
    main()

-# import sys +import sys -# input = sys.stdin.readline +input = sys.stdin.readline + +