# count p<=x<=q and p<=y <=q

# 長方形に含まれる格子点の数

import numpy as np

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



cnt = [[0]*(N+1) for _ in range(N+1)]

for _ in range(M):

  x,y = list(map(int,input().split()))

  cnt[x][y] += 1



# cumsumだけnumpyを使って、添字アクセスするときはlistの方が速い

cnt = np.cumsum(cnt,axis=0).cumsum(axis=1).tolist()



for _ in range(Q):

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

  p -= 1

  x = cnt[q][q]

  x -= cnt[q][p]

  x -= cnt[p][q]

  x += cnt[p][p]

  print(x)
import numpy as np

import sys

readline = sys.stdin.readline

readlines = sys.stdin.readlines



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

lines = readlines()

L,R = np.array([line.split() for line in lines[:M]],np.int32).T

P,Q = np.array([line.split() for line in lines[M:]],np.int32).T



cnt = np.zeros((N+1,N+1),dtype=np.int32)

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



np.cumsum(cnt,axis=0,out=cnt)

np.cumsum(cnt,axis=1,out=cnt)



P -= 1

x = cnt[Q,Q] - cnt[Q,P] - cnt[P,Q] + cnt[P,P]

print(('\n'.join(x.astype(str))))
# count p<=x<=q and p<=y <=q
# 長方形に含まれる格子点の数
import numpy as np

N, M, Q = list(map(int, input().split()))
cnt = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    x, y = list(map(int, input().split()))
    cnt[x][y] += 1
# cumsumだけnumpyを使って、添字アクセスするときはlistの方が速い
cnt = np.cumsum(cnt, axis=0).cumsum(axis=1).tolist()
for _ in range(Q):
    p, q = list(map(int, input().split()))
    p -= 1
    x = cnt[q][q]
    x -= cnt[q][p]
    x -= cnt[p][q]
    x += cnt[p][p]
    print(x)

import numpy as np
import sys

readline = sys.stdin.readline
readlines = sys.stdin.readlines
N, M, Q = list(map(int, readline().split()))
lines = readlines()
L, R = np.array([line.split() for line in lines[:M]], np.int32).T
P, Q = np.array([line.split() for line in lines[M:]], np.int32).T
cnt = np.zeros((N + 1, N + 1), dtype=np.int32)
np.add.at(cnt, (L, R), 1)
np.cumsum(cnt, axis=0, out=cnt)
np.cumsum(cnt, axis=1, out=cnt)
P -= 1
x = cnt[Q, Q] - cnt[Q, P] - cnt[P, Q] + cnt[P, P]
print(("\n".join(x.astype(str))))

-# count p<=x<=q and p<=y <=q -# 長方形に含まれる格子点の数 +import sys -N, M, Q = list(map(int, input().split())) -cnt = [[0] * (N + 1) for _ in range(N + 1)] -for _ in range(M): -    x, y = list(map(int, input().split())) -    cnt[x][y] += 1 -# cumsumだけnumpyを使って、添字アクセスするときはlistの方が速い -cnt = np.cumsum(cnt, axis=0).cumsum(axis=1).tolist() -for _ in range(Q): -    p, q = list(map(int, input().split())) -    p -= 1 -    x = cnt[q][q] -    x -= cnt[q][p] -    x -= cnt[p][q] -    x += cnt[p][p] -    print(x) +readline = sys.stdin.readline +readlines = sys.stdin.readlines +N, M, Q = list(map(int, readline().split())) +lines = readlines() +L, R = np.array([line.split() for line in lines[:M]], np.int32).T +P, Q = np.array([line.split() for line in lines[M:]], np.int32).T +cnt = np.zeros((N + 1, N + 1), dtype=np.int32) +np.add.at(cnt, (L, R), 1) +np.cumsum(cnt, axis=0, out=cnt) +np.cumsum(cnt, axis=1, out=cnt) +P -= 1 +x = cnt[Q, Q] - cnt[Q, P] - cnt[P, Q] + cnt[P, P] +print(("\n".join(x.astype(str))))