#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)

#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound

const int MOD = 1000000007;

int X, K, Q, lst = 0, dir = -1;
vi todo;
int a,b,c;

void process(int ti) {
    while (ti) {
        if (ti < abs(todo[todo.size()-1])) {
            int sgn = todo[todo.size()-1] > 0 ? 1 : -1;
            todo[todo.size()-1] -= sgn*ti;
            c += sgn*ti;
            ti = 0;
        } else {
            c += todo[todo.size()-1];
            ti -= abs(todo[todo.size()-1]);
            todo.erase(todo.end()-1);
        }
        if (a+c < 0) {
            if (b+c > 0) a = -c;
            else a = b = c = 0;
        } else if (b+c > X) {
            if (a+c < X) b = X-c;
            else a = b = 0, c = X;
        }
    }
}

int main() {
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin >> X >> K; 
	F0R(i,K) {
	    int r; cin >> r;
	    todo.pb((r-lst)*dir);
	    dir *= -1; lst = r;
	}
	todo.pb(MOD);
	reverse(todo.begin(),todo.end());
	
	a = 0, b = X, c = 0;
	cin >> Q; lst = 0;
	F0R(i,Q) {
	    int t, z; cin >> t >> z;
	    process(t-lst);
	    if (z <= a) cout << a+c << "\n";
	    else if (z <= b) cout << z+c << "\n";
	    else cout << b+c << "\n";
	    lst = t;
	}
}

// read!
// ll vs. int!