#include <bits/stdc++.h>

#define fr first
#define sc second
#define OK puts("OK");
#define pb push_back
#define mk make_pair

using namespace std;

typedef long long ll;

const int inf = (int)1e9 + 7;
const int N = (int)1e5 + 7;

int x;
int n,q;
int cur;
int a[N];
int tt,l;
ll ans,t[N],s[N];

 main () {
        cin >> x;
        cin >> n;

        for (int i = 1; i <= n; i ++) {
                cin >> a[i];
                t[i] = a[i] - a[i - 1];

                if (i % 2 == 0)
                        t[i] *= -1;
        }

        for (int i = 1; i <= n; i ++) {
                t[i] = cur - t[i];
                cur = t[i];
                s[i] = s[i - 1] + cur;
        }
        cin >> q;

        for (int i = 1; i <= q; i ++) {
                cin >> tt >> l;
                int pos = upper_bound(a + 1,a + n + 1,tt) - a - 1;
                ans = max(0ll,abs(s[pos]) - l * pos);
                cur = t[pos] + l + ans;
                if (pos % 2 == 0)
                        cout << max(0,cur - (tt - a[pos])) << endl;
                else
                        cout << min(x,cur + (tt - a[pos])) << endl;
        }

}
