import numpy as np

import sys

line = sys.stdin.readlines()



N, M, Q = list(map(int, line[0].split()))

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

L, R = np.array(list(map(str.split, line[1:M + 1])), np.int32).T

p, q = np.array(list(map(str.split, line[M + 1:])), np.int32).T



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

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

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



p -= 1

answer = city[q, q] - city[p, q] - city[q, p] + city[p, p]

print(('\n'.join(answer.astype(str))))
import numpy as np

import sys

buf = sys.stdin.buffer



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

city = np.zeros((N + 1, N + 1), np.int32)

LRpq = np.array(buf.read().split(), np.int32)



LR = LRpq[:2 * M]

L = LR[::2]

R = LR[1::2]



pq = LRpq[2 * M:]

p = pq[::2]

q = pq[1::2]



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

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

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



p -= 1

answer = city[q, q] - city[p, q] - city[q, p] + city[p, p]

print(('\n'.join(answer.astype(str))))
import numpy as np
import sys

line = sys.stdin.readlines()
N, M, Q = list(map(int, line[0].split()))
city = np.zeros((N + 1, N + 1), dtype="int32")
L, R = np.array(list(map(str.split, line[1 : M + 1])), np.int32).T
p, q = np.array(list(map(str.split, line[M + 1 :])), np.int32).T
np.add.at(city, (L, R), 1)
np.cumsum(city, axis=0, out=city)
np.cumsum(city, axis=1, out=city)
p -= 1
answer = city[q, q] - city[p, q] - city[q, p] + city[p, p]
print(("\n".join(answer.astype(str))))

import numpy as np
import sys

buf = sys.stdin.buffer
N, M, Q = list(map(int, buf.readline().split()))
city = np.zeros((N + 1, N + 1), np.int32)
LRpq = np.array(buf.read().split(), np.int32)
LR = LRpq[: 2 * M]
L = LR[::2]
R = LR[1::2]
pq = LRpq[2 * M :]
p = pq[::2]
q = pq[1::2]
np.add.at(city, (L, R), 1)
np.cumsum(city, axis=0, out=city)
np.cumsum(city, axis=1, out=city)
p -= 1
answer = city[q, q] - city[p, q] - city[q, p] + city[p, p]
print(("\n".join(answer.astype(str))))

-line = sys.stdin.readlines() -N, M, Q = list(map(int, line[0].split())) -city = np.zeros((N + 1, N + 1), dtype="int32") -L, R = np.array(list(map(str.split, line[1 : M + 1])), np.int32).T -p, q = np.array(list(map(str.split, line[M + 1 :])), np.int32).T +buf = sys.stdin.buffer +N, M, Q = list(map(int, buf.readline().split())) +city = np.zeros((N + 1, N + 1), np.int32) +LRpq = np.array(buf.read().split(), np.int32) +LR = LRpq[: 2 * M] +L = LR[::2] +R = LR[1::2] +pq = LRpq[2 * M :] +p = pq[::2] +q = pq[1::2]