fun main(args: Array<String>) {
    val (N, M, Q) = readInputLine().split(" ").map { it.toInt() }
    
    val sec = Array(N + 1) { IntArray(N + 1) }
    
    for (i in 1..M) {
        val (L, R) = readInputLine().split(" ").map { it.toInt() }
        for (j in 0..L) {
            sec[j][R]++
        }
    }
    
    for (i in 1..N) {
        for (j in 1..N) {
            sec[i][j] += sec[i][j - 1]
        }
    }
    
    for (i in 1..Q) {
        val (p, q) = readInputLine().split(" ").map { it.toInt() }
        println(sec[p][q])
    }
}

fun readInputLine(): String {
    return readLine()!!
}
