import           Control.Monad
import           Control.Monad.ST
import           Data.Array.Unboxed
import           Data.Array.ST
import qualified Data.ByteString.Char8 as B
import           Data.Char
import           Data.List

readInts :: IO [Int]
readInts = unfoldr (B.readInt . B.dropWhile isSpace) <$> B.getLine

main :: IO ()
main = do
  [n, m, k] <- readInts
  lrs <- replicateM m readInts
  pqs <- replicateM k readInts
  let ary = runSTUArray $ mkArray n lrs

  forM_ pqs $ \[p, q] ->
    print $ ary!(q, q) - ary!(p-1, q) - ary!(q, p-1) + ary!(p-1, p-1)


mkArray :: Int -> [[Int]] -> ST s (STUArray s (Int, Int) Int)
mkArray n lrs = do
  a_ary <- newArray ((0, 0), (n, n)) 0 :: ST s (STUArray s (Int, Int) Int)
  b_ary <- newArray ((0, 0), (n, n)) 0 :: ST s (STUArray s (Int, Int) Int)

  forM_ lrs $ \[l, r] ->
    writeArray a_ary (l, r) =<< (+1) <$> readArray a_ary (l, r)

  forM_ [1..n] $ \i ->
    forM_ [1..n] $ \j ->
      writeArray b_ary (i, j) =<< (\x y z w -> x + y - z + w)
        <$> readArray b_ary (i-1, j)
        <*> readArray b_ary (i, j-1)
        <*> readArray b_ary (i-1, j-1)
        <*> readArray a_ary (i, j)

  return b_ary
