#include <bits/stdc++.h>
using namespace std;
int x, k, r[100005], q;
vector<long long> vec, mn, mx;
int nxt[100005][18];
int seg[(1 << 18)], seg2[(1 << 18)];
void update(int k, int a) {
  k += (1 << 18) / 2 - 1;
  seg[k] = a;
  while (k > 0) {
    k = (k - 1) / 2;
    seg[k] = max(seg[k * 2 + 1], seg[k * 2 + 2]);
  }
}
int query(int a, int b, int k, int l, int r) {
  if (r < a || b < l) return 0;
  if (a <= l && r <= b)
    return seg[k];
  else {
    int vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
    int vr = query(a, b, k * 2 + 2, (l + r) / 2 + 1, r);
    return max(vl, vr);
  }
}
void update2(int k, int a) {
  k += (1 << 18) / 2 - 1;
  seg2[k] = a;
  while (k > 0) {
    k = (k - 1) / 2;
    seg2[k] = min(seg2[k * 2 + 1], seg2[k * 2 + 2]);
  }
}
int query2(int a, int b, int k, int l, int r) {
  if (r < a || b < l) return 1000000000;
  if (a <= l && r <= b)
    return seg2[k];
  else {
    int vl = query2(a, b, k * 2 + 1, l, (l + r) / 2);
    int vr = query2(a, b, k * 2 + 2, (l + r) / 2 + 1, r);
    return min(vl, vr);
  }
}
int main() {
  scanf("%d%d", &x, &k);
  for (int i = 1; i <= k; i++) scanf("%d", &r[i]);
  for (int i = 1; i <= k; i++) {
    int a = -1;
    if (i % 2 == 0) a = 1;
    long long pre = (i == 1 ? 0LL : vec[i - 2]);
    vec.push_back(pre + 1LL * a * (r[i] - r[i - 1]));
    pre = (i == 1 ? 1e18 : mn[i - 2]);
    mn.push_back(min(pre, vec[i - 1]));
    update2(i - 1, mn[i - 1]);
    pre = (i == 1 ? -1e18 : mx[i - 2]);
    mx.push_back(max(pre, vec[i - 1]));
    update(i - 1, mx[i - 1]);
  }
  for (int i = vec.size() - 1; i >= 0; i--) {
    int lb = i, ub = k;
    while (ub - lb > 1) {
      int mid = (lb + ub) / 2;
      if (i % 2 == 0) {
        if (query2(i + 1, mid, 0, 0, (1 << 17) - 1) < vec[i] ||
            query(i + 1, mid, 0, 0, (1 << 17) - 1) > vec[i] + 1LL * x) {
          ub = mid;
        } else {
          lb = mid;
        }
      } else {
        if (query2(i + 1, mid, 0, 0, (1 << 17) - 1) < vec[i] - 1LL * x ||
            query(i + 1, mid, 0, 0, (1 << 17) - 1) > vec[i]) {
          ub = mid;
        } else {
          lb = mid;
        }
      }
    }
    nxt[i][0] = ub;
  }
  for (int i = 0; i < 17; i++) {
    for (int j = 0; j < vec.size(); j++) {
      if (nxt[j][i] == k)
        nxt[j][i + 1] = k;
      else
        nxt[j][i + 1] = nxt[nxt[j][i]][i];
    }
  }
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    long long t, a;
    scanf("%lld%lld", &t, &a);
    int lb = -1, ub = k;
    while (ub - lb > 1) {
      int mid = (lb + ub) / 2;
      if (mn[mid] + a < 0 || mx[mid] + a > 1LL * x) {
        ub = mid;
      } else {
        lb = mid;
      }
    }
    if (ub == k || r[ub] >= t) {
      int xx = -1;
      int A = lower_bound(r + 1, r + k + 1, t) - r;
      long long dif = (A == 1 ? 0 : vec[A - 2]) - (xx == -1 ? 0 : vec[xx]) + a;
      if ((A - 1) % 2 == 0)
        dif -= (t - r[A - 1]);
      else
        dif += (t - r[A - 1]);
      dif = max(dif, 0ll);
      dif = min(dif, 1LL * x);
      printf("%lld\n", dif);
    } else {
      int xx = ub;
      int A = lower_bound(r + 1, r + k + 1, t) - r;
      if (ub + 1 <= k && r[ub + 1] >= t) {
        xx--;
        long long dif =
            (A == 1 ? 0 : vec[A - 2]) - (xx == -1 ? 0 : vec[xx]) + a;
        if ((A - 1) % 2 == 0)
          dif -= (t - r[A - 1]);
        else
          dif += (t - r[A - 1]);
        dif = max(dif, 0ll);
        dif = min(dif, 1LL * x);
        printf("%lld\n", dif);
        continue;
      }
      for (int i = 17; i >= 0; i--) {
        if (nxt[xx][i] == k || r[nxt[xx][i]] >= t)
          ;
        else
          xx = nxt[xx][i];
      }
      long long dif = (A == 1 ? 0 : vec[A - 2]) - (xx == -1 ? 0 : vec[xx]);
      if ((A - 1) % 2 == 0)
        dif -= (t - r[A - 1]);
      else
        dif += (t - r[A - 1]);
      dif = max(dif, 0ll);
      dif = min(dif, 1LL * x);
      printf("%lld\n", dif);
    }
  }
}
