#include <bits/stdc++.h>

namespace ext {
	using namespace std;
	template<class T>
	struct Vector : std::vector<T> {
		using std::vector<T>::vector;
		char dil = ' ';
		Vector<T> accum() {
			Vector<T> res(this->size() + 1);
			for (size_t i = 0; i < this->size(); i++) {
				res[i+1] = (*this)[i] + res[i];
			}
			return res;
		}
		Vector<T> accum2D() {
			cerr << "Not Difined accum2D" << endl;
			exit(1);
			return *this;
		}
//		template<class U>
//		friend Vector<Vector<U>> accum2D(Vector<Vector<U>>& v) {
//			const size_t H = this->size();
//			const size_t W = (*this)[0].size();
//			using S = decltype((*this)[0][0]);
//			Vector<Vector<U>> res(H + 1, Vector<U>(W + 1));
//			for (size_t i = 0; i < H; i++) {
//				for (size_t j = 0; j < W; j++) {
//					res[i+1][j+1] = (*this)[i][j];
//					res[i+1][j+1] += res[i][j+1];
//					res[i+1][j+1] += res[i+1][j];
//					res[i+1][j+1] -= res[i+1][j+1];
//				}
//			}
//			return res;
//		}
		Vector<T> zaatsu() {
			map<T, int> m;
			for (auto& e: *this) m[e] = 1;
			int count = 0;
			for (auto& e: m) e.second = count++;
			Vector<T> res = *this;
			for (auto& e: res) e = m[e];
			return res;
		}
		friend istream& operator>>(istream& is, vector<T>& t) {
			for (auto& e: t) cin >> e;
			return is;
		}
		friend ostream& operator<<(ostream& os, vector<T>& t) {
			t.print(' ', os);
			return os;
		}
		void print(char del = ' ', ostream& os = cout) {
			for (size_t i = 0; i < this->size(); i++) {
				os << (*this)[i];
				if (i + 1 != this->size()) os << del;
				os.flush();
			}
		}
		void println(char del = ' ', ostream& os = cout) {
			print(del, os);
			cout << endl;
		}
		long long crossing_merge() {
			auto t = *this;
			return t.crossing_merge_sub();
		}
		// 半開区間
		long long crossing_bit(T min_v = -1, T max_v = -1) {
			if (min_v == -1) min_v = this->min();
			if (max_v == -1) max_v = this->max() + 1;
			Vector<T> bit(max_v - min_v + 1, 0);
			long long res = 0;
			for (auto e: *this) {
				e = max_v - e;
				for (size_t x = e - 1; x; x -= x & -x) {
					res += bit[x];
				}
				for (size_t x = e; x < bit.size() ; x += x & -x) {
					bit[x]++;
				}
			}
			return res;
		}
		bool permutation() {
			return next_permutation(this->begin(), this->end());
		}
		T& max() {
			return *max_element(this->begin(), this->end());
		}
		T& min() {
			return *min_element(this->begin(), this->end());
		}
private:
		long long crossing_merge_sub() {
			if (this->size() == 1) return 0;
			int x = this->size() / 2;
			Vector<T> left(this->begin(), this->begin() + x);
			Vector<T> right(this->begin() + x, this->end());
			long long res = left.crossing_merge_sub() + right.crossing_merge_sub();
			left.push_back(numeric_limits<T>::max()); right.push_back(numeric_limits<T>::max());
			size_t l = 0, r = 0;
			while (l + r < this->size()) {
				if (left[l] < right[r]) {
					(*this)[l+r] = left[l];
					l++;
				} else {
					(*this)[l+r] = right[r];
					r++;
					res += x - l;
				}
			}
			return res;
		}
	};
	template<>
	Vector<Vector<long long>> Vector<Vector<long long>>::accum2D() {
		auto& v = *this;
		const size_t H = v.size();
		const size_t W = v[0].size();
		Vector<Vector<long long>> res(H + 1, Vector<long long>(W + 1));
		for (size_t i = 0; i < H; i++) {
			for (size_t j = 0; j < W; j++) {
				res[i+1][j+1] = v[i][j];
				res[i+1][j+1] += res[i][j+1];
				res[i+1][j+1] += res[i+1][j];
				res[i+1][j+1] -= res[i][j];
			}
		}
		return res;
	}
}

using namespace std;
using namespace ext;

bool isok(int k, const Vector<int>& a) {
	Vector<int> v(a.size()+1);
	auto res = 0LL;
	for (int i = 0; i < a.size(); i++) {
		v[i+1] = (a[i] >= k) ? 1 : -1;
		v[i+1] += v[i];
	}
	res += v.crossing_bit() ;
	auto al = (long long) a.size() * (a.size() + 1) / 2;
	return res <= al - res;
}

int main() {
	int N, M, Q;
	cin >> N >> M >> Q;
	Vector<Vector<long long>> v(N, Vector<long long>(N));
	for (int i = 0; i < M; i++) {
		int p, q; cin >> p >> q; p--, q--;
		v[p][q]++;
	}
	auto sum = v.accum2D();
	for (int i = 0; i < Q; i++) {
		int p, q; cin >> p >> q; p--;
		cout << sum[p][p] + sum[q][q] - sum[p][q] - sum[q][p] << endl;
	}
}

Measured memory_bytes: 4864