#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, k;
  cin >> x >> k;
  k++;
  vector<long long> r(k);
  for (int i = 0; i < k - 1; ++i) scanf("%lld", &r[i + 1]);
  vector<long long> s(k + 1), smin(k + 1), smax(k + 1);
  int q;
  cin >> q;
  int i = 1;
  int st = 0;
  int hoge = -1;
  while (q--) {
    long long t, a;
    scanf("%lld %lld", &t, &a);
    while (i < k && r[i] < t) {
      smin[i] = smin[i - 1];
      smax[i] = smax[i - 1];
      if (i % 2 == 1) {
        s[i] = s[i - 1] - (r[i] - r[i - 1]);
        smin[i] = min(smin[i], s[i]);
      } else {
        s[i] = s[i - 1] + (r[i] - r[i - 1]);
        smax[i] = max(smax[i], s[i]);
      }
      if (smax[i] - smin[i] >= x) {
        if (i % 2 == 1)
          hoge = x;
        else
          hoge = 0;
        st = i;
        smin[i] = smax[i] = s[i];
      }
      cout << s[i] << endl;
      i++;
    }
    if (hoge != -1) a = hoge;
    int p;
    if (a + smin[i - 1] - s[st] >= 0 && a + smax[i - 1] - s[st] <= x) {
      p = a + s[i - 1] - s[st];
    } else {
      int l = st, r = i - 1;
      while (r - l > 1) {
        int m = (r + l) / 2;
        if (a + smin[m] - s[st] >= 0 && a + smax[m] - s[st] <= x)
          l = m;
        else
          r = m;
      }
      if (r % 2 == 0)
        p = x + s[i - 1] - s[r];
      else
        p = s[i - 1] - s[r];
    }
    long long ans;
    if (i % 2 == 0)
      ans = p + t - r[i - 1];
    else
      ans = p - (t - r[i - 1]);
    ans = max(ans, 0LL);
    ans = min(ans, x);
    printf("%lld\n", ans);
  }
  return 0;
}
