import Control.Monad
import Data.Array.IO
main = do
  [n,m,q] <- map read . words <$> getLine
  arr <- newArray ((1,1),(n,n)) 0 :: IO (IOUArray (Int,Int) Int)
  replicateM_ m $ do
    [l, r] <- map read . words <$> getLine
    acc <- readArray arr (l, r)
    writeArray arr (l, r) (acc + 1)
  replicateM_ q $ do
    [p, q] <- map read . words <$> getLine
    print =<< sum . concat <$> forM [p..q] (\l -> forM [p..q] (\r -> readArray arr (l,r)))
