program main
  implicit none
  integer :: n, m, queries, p, q, i, l, r
  integer, allocatable :: c(:, :), d(:, :)
  read *, n, m, queries
  allocate (c(n, n), d(0:n, 0:n))
  d(:, :) = 0
  do i = 1, m
    read *, l, r
    d(l, r) = d(l, r) + 1
  end do
  do i = 1, n
    d(i, :) = d(i, :) + d(i - 1, :)
  end do
  do i = 1, n
    d(:, i) = d(:, i) + d(:, i - 1)
  end do
  do i = 1, queries
    read *, p, q
    print "(i0)", d(n, q) - d(n, 0) - d(p - 1, q) + d(p - 1, 0)
  end do
end program main
