import sys

input = sys.stdin.readline



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

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



for _ in range(M):

    L, R = list(map(int, input().split()))

    L -= 1

    R -= 1

    A[0][R] += 1

    A[0][N] -= 1

    A[L+1][R] -= 1

    A[L+1][N] += 1



for i in range(N+1):

    for j in range(N):

        A[i][j+1] += A[i][j]



for i in range(N):

    for j in range(N+1):

        A[i+1][j] += A[i][j]



for _ in range(Q):

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

    p -= 1

    q -= 1

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

input = sys.stdin.readline

from collections import *



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

A = [[0]*N for _ in range(N)]



for _ in range(M):

    L, R = list(map(int, input().split()))

    A[L-1][R-1] += 1



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



for i in range(N):

    for j in range(N):

        acc[i+1][j+1] = acc[i+1][j]+acc[i][j+1]-acc[i][j]+A[i][j]

    

for _ in range(Q):

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

    p -= 1

    q -= 1

    print((acc[q+1][q+1]-acc[q+1][p]-acc[p][q+1]+acc[p][p]))
import sys

input = sys.stdin.readline
N, M, Q = list(map(int, input().split()))
A = [[0] * (N + 1) for _ in range(N + 1)]
for _ in range(M):
    L, R = list(map(int, input().split()))
    L -= 1
    R -= 1
    A[0][R] += 1
    A[0][N] -= 1
    A[L + 1][R] -= 1
    A[L + 1][N] += 1
for i in range(N + 1):
    for j in range(N):
        A[i][j + 1] += A[i][j]
for i in range(N):
    for j in range(N + 1):
        A[i + 1][j] += A[i][j]
for _ in range(Q):
    p, q = list(map(int, input().split()))
    p -= 1
    q -= 1
    print((A[p][q]))

import sys

input = sys.stdin.readline
from collections import *

N, M, Q = list(map(int, input().split()))
A = [[0] * N for _ in range(N)]
for _ in range(M):
    L, R = list(map(int, input().split()))
    A[L - 1][R - 1] += 1
acc = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(N):
    for j in range(N):
        acc[i + 1][j + 1] = acc[i + 1][j] + acc[i][j + 1] - acc[i][j] + A[i][j]
for _ in range(Q):
    p, q = list(map(int, input().split()))
    p -= 1
    q -= 1
    print((acc[q + 1][q + 1] - acc[q + 1][p] - acc[p][q + 1] + acc[p][p]))

+from collections import * + -A = [[0] * (N + 1) for _ in range(N + 1)] +A = [[0] * N for _ in range(N)] -    L -= 1 -    R -= 1 -    A[0][R] += 1 -    A[0][N] -= 1 -    A[L + 1][R] -= 1 -    A[L + 1][N] += 1 -for i in range(N + 1): +    A[L - 1][R - 1] += 1 +acc = [[0] * (N + 1) for _ in range(N + 1)] +for i in range(N): -        A[i][j + 1] += A[i][j] -for i in range(N): -    for j in range(N + 1): -        A[i + 1][j] += A[i][j] +        acc[i + 1][j + 1] = acc[i + 1][j] + acc[i][j + 1] - acc[i][j] + A[i][j] -    print((A[p][q])) +    print((acc[q + 1][q + 1] - acc[q + 1][p] - acc[p][q + 1] + acc[p][p]))