#include <bits/stdc++.h>
using namespace std;
struct conv { 
	int l, r, x, pa;
       	bool can_merge(conv oth){
		if(r + 1 == oth.l){
			if(pa != oth.pa) return false;
			if(pa){
				if(x + r + 1 == oth.x + l) return true;
			} else {
				if(x == oth.x) return true;
			}
		}
		return false;
	}	
	conv operator + (conv oth){
		assert(can_merge(oth));
		return {l, oth.r, x, pa};
	}
};
struct node {
	vector<conv> convs;
	int get_id(int x){
		int id = 0;
		for(conv c : convs){
			if(c.l <= x && x <= c.r) return id;
			id++;
		}
		return id;
	}
	int get_val(int x){
		for(conv c : convs) if(c.l <= x && x <= c.r){
			if(c.pa) return c.x + x;
			else return c.x;
		}
		return -1;
	}
	conv get_conv(int l, int r, int x, int y){
		int cl = get_val(x);
		int cr = get_val(y);
		if(cl == cr) return { l, r, cl, 0 };
		return { l, r, cl - l, 1 };
	}
	void simplify(){
		sort(convs.begin(), convs.end(), [](conv a, conv b){
			return a.l < b.l;
		});
		vector<conv> rconvs;
		for(conv c : convs){
			if(rconvs.empty() || !rconvs.back().can_merge(c)) rconvs.push_back(c);
			else rconvs.back() = rconvs.back() + c;
		}
	}
	node operator + (node oth){
		node ans;
		for(conv c : convs){
			if(c.pa){
				int l = c.l, r = c.r;
				while(l <= r){
					int desired = oth.get_id(c.x + l);
					int lo = l + 1, hi = r, best = l;
					while(lo <= hi){
						int mid = (lo + hi)>>1;
						if(oth.get_id(c.x + mid) == desired){
							best = mid;
							lo = mid + 1;
						} else {
							hi = mid - 1;
						}
					}
					ans.convs.push_back(oth.get_conv(l, best, c.x + l, c.x + best));
					l = best + 1;
				}	
			} else {
				ans.convs.push_back({c.l, c.r, oth.get_val(c.x), 0});
			}
		}
		ans.simplify();
		return ans;
	}
};
int main(){
	int X; cin >> X;
	int k; cin >> k;
	vector<int> pts(k + 2); for(int i = 0; i < k; i++) cin >> pts[i + 1];
       	pts.back() = 1'000'000'001;
	int q; cin >> q;
	int pt = 0;
	node cur;
	cur.convs.push_back({0, X, 0, 1});
	for(int i = 0; i < q; i++){
		int t, a; cin >> t >> a;
		while(pts[pt + 1] <= t){
			int sz = pts[pt + 1] - pts[pt];
			node now;
			if(pt&1){
				if(sz < X)
					now.convs.push_back({0, X - sz, sz, 1});
				now.convs.push_back({max(0, X - sz + 1), X, X, 0});
			} else {
				now.convs.push_back({0, min(sz, X), 0, 0});
				if(sz < X)
			       		now.convs.push_back({sz + 1, X, -sz, 1});
			}
			cur = cur + now;	
			pt++;
		}
		int now = cur.get_val(a);
		if(pt&1){
			now += t - pts[pt];
			now = min(now, X);
		} else {
			now -= t - pts[pt];
			now = max(now, 0);
		}
		cout << now << endl;
	}	
	return 0;
}
