# coding: utf-8

import sys

import numpy as np



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

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



# N**2の解法

N, M, Q = lr()

graph = np.array([[0] * (N+1) for _ in range(N+1)])  # 1-indexed

for i in range(M):

    l, r = lr()

    graph[l][r] += 1



for i in range(N+1):

    graph[i] = graph[i].cumsum()



graph = np.cumsum(graph, axis=0)

for _ in range(Q):

    p, q = lr()

    answer = graph[q][q] - graph[q][p-1] - graph[p-1][q] + graph[p-1][p-1]

    print(answer)



# 30

# coding: utf-8

import sys

import numpy as np



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

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



# N**2の解法

N, M, Qu = lr()

graph = [[0] * (N+1) for _ in range(N+1)]  # 1-indexed

for i in range(M):

    l, r = lr()

    graph[l][r] += 1



graph = np.array(graph)

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

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

P = []; Q = []

for _ in range(Qu):

    p, q = lr()

    P.append(p); Q.append(q)



P = np.array(P); Q = np.array(Q)

answer = graph[Q, Q] - graph[Q, P-1] - graph[P-1, Q] + graph[P-1, P-1]

print(('\n'.join(answer.astype(str))))

# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
# N**2の解法
N, M, Q = lr()
graph = np.array([[0] * (N + 1) for _ in range(N + 1)])  # 1-indexed
for i in range(M):
    l, r = lr()
    graph[l][r] += 1
for i in range(N + 1):
    graph[i] = graph[i].cumsum()
graph = np.cumsum(graph, axis=0)
for _ in range(Q):
    p, q = lr()
    answer = graph[q][q] - graph[q][p - 1] - graph[p - 1][q] + graph[p - 1][p - 1]
    print(answer)
# 30

# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
# N**2の解法
N, M, Qu = lr()
graph = [[0] * (N + 1) for _ in range(N + 1)]  # 1-indexed
for i in range(M):
    l, r = lr()
    graph[l][r] += 1
graph = np.array(graph)
np.cumsum(graph, axis=1, out=graph)
np.cumsum(graph, axis=0, out=graph)
P = []
Q = []
for _ in range(Qu):
    p, q = lr()
    P.append(p)
    Q.append(q)
P = np.array(P)
Q = np.array(Q)
answer = graph[Q, Q] - graph[Q, P - 1] - graph[P - 1, Q] + graph[P - 1, P - 1]
print(("\n".join(answer.astype(str))))

-N, M, Q = lr() -graph = np.array([[0] * (N + 1) for _ in range(N + 1)])  # 1-indexed +N, M, Qu = lr() +graph = [[0] * (N + 1) for _ in range(N + 1)]  # 1-indexed -for i in range(N + 1): -    graph[i] = graph[i].cumsum() -graph = np.cumsum(graph, axis=0) -for _ in range(Q): +graph = np.array(graph) +np.cumsum(graph, axis=1, out=graph) +np.cumsum(graph, axis=0, out=graph) +P = [] +Q = [] +for _ in range(Qu): -    answer = graph[q][q] - graph[q][p - 1] - graph[p - 1][q] + graph[p - 1][p - 1] -    print(answer) -# 30 +    P.append(p) +    Q.append(q) +P = np.array(P) +Q = np.array(Q) +answer = graph[Q, Q] - graph[Q, P - 1] - graph[P - 1, Q] + graph[P - 1, P - 1] +print(("\n".join(answer.astype(str))))