import sys

input = sys.stdin.readline

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

L=[[0 for i in range(n)] for i in range(n)]

LL=[[0 for i in range(n)] for i in range(n)] 

for i in range(m):

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

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

LL[0][0]=L[0][0]

for i in range(1,n):

  LL[i][0]=LL[i-1][0]+L[i][0]

  LL[0][i]=LL[0][i-1]+L[0][i]

for i in range(1,n):

  for j in range(1,n):

    LL[i][j]=LL[i-1][j]+LL[i][j-1]+L[i][j]-LL[i-1][j-1]

for i in range(Q):

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

  if p==1:

    ans=LL[q-1][q-1]

  elif q==1:

    ans=LL[0][0]

  else:

    ans=LL[q-1][q-1]-LL[q-1][p-2]-LL[p-2][q-1]+LL[p-2][p-2]

  print(ans)
import sys

input=lambda: sys.stdin.readline().rstrip()

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

T=[[0]*(n+2) for _ in range(n+2)]

for _ in range(m):

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

  T[l][r]+=1

for i in range(1,n+1)[::-1]:

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

    T[i][j+1]+=T[i][j]

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

  for i in range(1,n+1)[::-1]: 

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



for _ in range(q):

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

  print((T[p][q]))
import sys

input = sys.stdin.readline
n, m, Q = list(map(int, input().split()))
L = [[0 for i in range(n)] for i in range(n)]
LL = [[0 for i in range(n)] for i in range(n)]
for i in range(m):
    l, r = list(map(int, input().split()))
    L[l - 1][r - 1] += 1
LL[0][0] = L[0][0]
for i in range(1, n):
    LL[i][0] = LL[i - 1][0] + L[i][0]
    LL[0][i] = LL[0][i - 1] + L[0][i]
for i in range(1, n):
    for j in range(1, n):
        LL[i][j] = LL[i - 1][j] + LL[i][j - 1] + L[i][j] - LL[i - 1][j - 1]
for i in range(Q):
    p, q = list(map(int, input().split()))
    if p == 1:
        ans = LL[q - 1][q - 1]
    elif q == 1:
        ans = LL[0][0]
    else:
        ans = LL[q - 1][q - 1] - LL[q - 1][p - 2] - LL[p - 2][q - 1] + LL[p - 2][p - 2]
    print(ans)

import sys

input = lambda: sys.stdin.readline().rstrip()
n, m, q = list(map(int, input().split()))
T = [[0] * (n + 2) for _ in range(n + 2)]
for _ in range(m):
    l, r = list(map(int, input().split()))
    T[l][r] += 1
for i in range(1, n + 1)[::-1]:
    for j in range(1, n + 1):
        T[i][j + 1] += T[i][j]
for j in range(1, n + 1):
    for i in range(1, n + 1)[::-1]:
        T[i - 1][j] += T[i][j]
for _ in range(q):
    p, q = list(map(int, input().split()))
    print((T[p][q]))

-input = sys.stdin.readline -n, m, Q = list(map(int, input().split())) -L = [[0 for i in range(n)] for i in range(n)] -LL = [[0 for i in range(n)] for i in range(n)] -for i in range(m): +input = lambda: sys.stdin.readline().rstrip() +n, m, q = list(map(int, input().split())) +T = [[0] * (n + 2) for _ in range(n + 2)] +for _ in range(m): -    L[l - 1][r - 1] += 1 -LL[0][0] = L[0][0] -for i in range(1, n): -    LL[i][0] = LL[i - 1][0] + L[i][0] -    LL[0][i] = LL[0][i - 1] + L[0][i] -for i in range(1, n): -    for j in range(1, n): -        LL[i][j] = LL[i - 1][j] + LL[i][j - 1] + L[i][j] - LL[i - 1][j - 1] -for i in range(Q): +    T[l][r] += 1 +for i in range(1, n + 1)[::-1]: +    for j in range(1, n + 1): +        T[i][j + 1] += T[i][j] +for j in range(1, n + 1): +    for i in range(1, n + 1)[::-1]: +        T[i - 1][j] += T[i][j] +for _ in range(q): -    if p == 1: -        ans = LL[q - 1][q - 1] -    elif q == 1: -        ans = LL[0][0] -    else: -        ans = LL[q - 1][q - 1] - LL[q - 1][p - 2] - LL[p - 2][q - 1] + LL[p - 2][p - 2] -    print(ans) +    print((T[p][q]))