n, m, q = list(map(int, input().split()))



train = [[0 for _ in range(n+1)] for __ in range(n+1)]



for _ in range(m):

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

    train[l][r] += 1



ans = [[0 for _ in range(n+1)] for __ in range(n+1)]



for i in range(n):

    for j in range(n+1):

        ans[i+1][j] = ans[i][j] + train[i+1][j]



for j in range(n):

    for i in range(n+1):

        ans[i][j+1] = ans[i][j+1] + ans[i][j]



for __ in range(q):

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

    print((ans[q][q] - ans[q][p-1] - ans[p-1][q] + ans[p-1][p-1]))
import sys

sys.setrecursionlimit(10 ** 7)

input = sys.stdin.readline



n, m, q = list(map(int, input().split()))



train = [[0 for _ in range(n)] for __ in range(n)]



for _ in range(m):

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

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



ans = [[0 for _ in range(n+1)] for __ in range(n+1)]



for i in range(n):

    for j in range(1, n+1):

        ans[i+1][j] = ans[i][j] + train[i][j-1]



for j in range(n):

    for i in range(n+1):

        ans[i][j+1] = ans[i][j+1] + ans[i][j]



for __ in range(q):

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

    print((ans[q][q] - ans[q][p-1] - ans[p-1][q] + ans[p-1][p-1]))

n, m, q = list(map(int, input().split()))
train = [[0 for _ in range(n + 1)] for __ in range(n + 1)]
for _ in range(m):
    l, r = list(map(int, input().split()))
    train[l][r] += 1
ans = [[0 for _ in range(n + 1)] for __ in range(n + 1)]
for i in range(n):
    for j in range(n + 1):
        ans[i + 1][j] = ans[i][j] + train[i + 1][j]
for j in range(n):
    for i in range(n + 1):
        ans[i][j + 1] = ans[i][j + 1] + ans[i][j]
for __ in range(q):
    p, q = list(map(int, input().split()))
    print((ans[q][q] - ans[q][p - 1] - ans[p - 1][q] + ans[p - 1][p - 1]))

import sys

sys.setrecursionlimit(10**7)
input = sys.stdin.readline
n, m, q = list(map(int, input().split()))
train = [[0 for _ in range(n)] for __ in range(n)]
for _ in range(m):
    l, r = list(map(int, input().split()))
    train[l - 1][r - 1] += 1
ans = [[0 for _ in range(n + 1)] for __ in range(n + 1)]
for i in range(n):
    for j in range(1, n + 1):
        ans[i + 1][j] = ans[i][j] + train[i][j - 1]
for j in range(n):
    for i in range(n + 1):
        ans[i][j + 1] = ans[i][j + 1] + ans[i][j]
for __ in range(q):
    p, q = list(map(int, input().split()))
    print((ans[q][q] - ans[q][p - 1] - ans[p - 1][q] + ans[p - 1][p - 1]))

+import sys + +sys.setrecursionlimit(10**7) +input = sys.stdin.readline -train = [[0 for _ in range(n + 1)] for __ in range(n + 1)] +train = [[0 for _ in range(n)] for __ in range(n)] -    train[l][r] += 1 +    train[l - 1][r - 1] += 1 -    for j in range(n + 1): -        ans[i + 1][j] = ans[i][j] + train[i + 1][j] +    for j in range(1, n + 1): +        ans[i + 1][j] = ans[i][j] + train[i][j - 1]