#include <bits/stdc++.h>
using namespace std;
int n, q;
long long t[100010];
priority_queue<pair<pair<long long, long long>, int>,
               vector<pair<pair<long long, long long>, int> >,
               greater<pair<pair<long long, long long>, int> > >
    Q;
long long x, ans[100010];
int main() {
  cin >> x >> n;
  t[0] = 0;
  for (int i = 0; i < n; i++) cin >> t[i + 1];
  t[n + 1] = 1145141919;
  cin >> q;
  for (int i = 0; i < q; i++) {
    long long a, b;
    cin >> a >> b;
    Q.push(make_pair(make_pair(a, b), i));
  }
  long long now = 0, mi = 0, mx = 0;
  for (int i = 1; i <= n + 1; i++) {
    while (!Q.empty()) {
      if (Q.top().first.first > t[i]) break;
      long long nmi, nmx, nnow = now;
      if (i % 2 == 0) nnow += Q.top().first.first - t[i - 1];
      if (i % 2 == 1) nnow -= Q.top().first.first - t[i - 1];
      nmx = max(mx, nnow);
      nmi = min(mi, nnow);
      nmx += Q.top().first.second, nmi += Q.top().first.second,
          nnow += Q.top().first.second;
      if (nmi < 0) nnow += 0 - nmi;
      if (nmx > x) nnow -= nmx - x;
      if (nnow < 0) nnow = 0;
      if (nnow > x) nnow = x;
      ans[Q.top().second] = nnow;
      Q.pop();
    }
    if (i % 2 == 0)
      now += t[i] - t[i - 1];
    else
      now -= t[i] - t[i - 1];
    mi = min(mi, now);
    mx = max(mx, now);
  }
  for (int i = 0; i < q; i++) cout << ans[i] << endl;
  return 0;
}
