let () = Scanf.scanf "%d %d %d\n" @@ fun n m q ->
  let acc = Array.make (n + 2) 0 in
  let acc' = Array.make (n + 2) 0 in
  for i = 0 to m - 1 do
    Scanf.scanf "%d %d\n" @@ fun l r ->
      acc.(l + 1) <- 1 + acc.(l + 1);
      acc'.(r) <- 1 + acc'.(r)
  done;
  for i = 0 to n do
    acc.(i + 1) <- acc.(i) + acc.(i + 1);
    acc'.(i + 1) <- acc'.(i) + acc'.(i + 1)
  done;
  for i = 0 to q - 1 do
    Scanf.scanf "%d %d\n" @@ fun p q ->
      Printf.printf "%d\n" @@ acc'.(q) - acc.(p)
  done
