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

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

for i in range(M):

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

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

for i in range(N):

  for j in range(N-1, 0, -1):

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

for j in range(N):

  for i in range(N-1):

    dp[i+1][j] += dp[i][j]

for i in range(Q):

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

  print((dp[q-1][p-1]))
import numpy as np

N, M, Q, *X = list(map(int, open(0).read().split()))

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

for l, r in zip(*[iter(X[:2*M])]*2):

  sheet[N-l][r-1] += 1



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

for p,q in zip(*[iter(X[2*M:])]*2):

  print((sheet[N-p][q-1]))
N, M, Q = list(map(int, input().split()))
dp = [[0] * N for i in range(N)]
for i in range(M):
    l, r = list(map(int, input().split()))
    dp[r - 1][l - 1] += 1
for i in range(N):
    for j in range(N - 1, 0, -1):
        dp[i][j - 1] += dp[i][j]
for j in range(N):
    for i in range(N - 1):
        dp[i + 1][j] += dp[i][j]
for i in range(Q):
    p, q = list(map(int, input().split()))
    print((dp[q - 1][p - 1]))

import numpy as np

N, M, Q, *X = list(map(int, open(0).read().split()))
sheet = [[0] * N for i in range(N)]
for l, r in zip(*[iter(X[: 2 * M])] * 2):
    sheet[N - l][r - 1] += 1
sheet = np.cumsum(np.cumsum(sheet, axis=1), axis=0)
for p, q in zip(*[iter(X[2 * M :])] * 2):
    print((sheet[N - p][q - 1]))

-N, M, Q = list(map(int, input().split())) -dp = [[0] * N for i in range(N)] -for i in range(M): -    l, r = list(map(int, input().split())) -    dp[r - 1][l - 1] += 1 -for i in range(N): -    for j in range(N - 1, 0, -1): -        dp[i][j - 1] += dp[i][j] -for j in range(N): -    for i in range(N - 1): -        dp[i + 1][j] += dp[i][j] -for i in range(Q): -    p, q = list(map(int, input().split())) -    print((dp[q - 1][p - 1])) +import numpy as np + +N, M, Q, *X = list(map(int, open(0).read().split())) +sheet = [[0] * N for i in range(N)] +for l, r in zip(*[iter(X[: 2 * M])] * 2): +    sheet[N - l][r - 1] += 1 +sheet = np.cumsum(np.cumsum(sheet, axis=1), axis=0) +for p, q in zip(*[iter(X[2 * M :])] * 2): +    print((sheet[N - p][q - 1]))