#include <bits/stdc++.h>
const int N = 1e5 + 9;
const long long inf = 1e10 + 7;
using namespace std;
struct node {
  int l, r;
  long long minnA, minnB;
} point[N * 4];
long long in() {
  long long t = 0, f = 1;
  char ch = getchar();
  while ((ch > '9' || ch < '0') && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (ch >= '0' && ch <= '9')
    t = (t << 1) + (t << 3) + ch - '0', ch = getchar();
  return t;
}
int X, k, rev[N], q;
long long sum1[N], sum2[N];
void update(int now) {
  if (point[now << 1].l == 0)
    point[now << 1].minnA = point[now << 1].minnB = inf;
  if (point[now << 1 | 1].l == 0)
    point[now << 1 | 1].minnA = point[now << 1 | 1].minnA = inf;
  point[now].minnA = min(point[now << 1].minnA, point[now << 1 | 1].minnA);
  point[now].minnB = min(point[now << 1].minnB, point[now << 1 | 1].minnB);
}
void buildtree(int now, int l, int r) {
  point[now].l = l;
  point[now].r = r;
  if (l == r) {
    point[now].minnA = sum1[l];
    point[now].minnB = sum2[l];
    return;
  }
  buildtree(now << 1, l, (l + r) / 2);
  buildtree(now << 1 | 1, (l + r) / 2 + 1, r);
  update(now);
}
int getminnA(int now, int l, int r) {
  if (point[now].l > r || point[now].r < l) return inf;
  if (point[now].l >= l && point[now].r <= r) return point[now].minnA;
  return min(getminnA(now << 1, l, r), getminnA(now << 1 | 1, l, r));
}
int getminnB(int now, int l, int r) {
  if (point[now].l > r || point[now].r < l) return inf;
  if (point[now].l >= l && point[now].r <= r) return point[now].minnB;
  return min(getminnB(now << 1, l, r), getminnB(now << 1 | 1, l, r));
}
int getmin(int l, int r, long long w) {
  if (r == 0) return k + 1;
  int now = 1;
  long long w1 = -w, w2 = w - X;
  int flag = 0;
  if (point[now].minnA > w1 && point[now].minnB > w2) return k + 1;
  while (point[now].l != point[now].r) {
    if ((point[now << 1 | 1].minnA <= w1 || point[now << 1 | 1].minnB <= w2) &&
        point[now << 1 | 1].l <= r) {
      now = now << 1 | 1;
      continue;
    } else {
      if ((point[now << 1].minnA <= w1 || point[now << 1].minnB <= w2) &&
          (r <= point[now << 1].r || flag)) {
        now = now << 1;
        flag = 1;
        continue;
      } else {
        if (point[now].l != point[now].r) return k + 1;
      }
    }
  }
  return point[now].l;
}
int getpos(int now) {
  int l = 0, r = k;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (rev[mid] <= now)
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
int main() {
  scanf("%d%d", &X, &k);
  for (int i = 1; i <= k; ++i) scanf("%d", &rev[i]);
  sum1[0] = 0;
  sum2[0] = 0;
  for (int i = 1; i <= k; ++i) {
    if (i & 1)
      sum1[i] = sum1[i - 1] - (rev[i] - rev[i - 1]),
      sum2[i] = sum2[i - 1] + (rev[i] - rev[i - 1]);
    else
      sum1[i] = sum1[i - 1] + rev[i] - rev[i - 1],
      sum2[i] = sum2[i - 1] - (rev[i] - rev[i - 1]);
  }
  buildtree(1, 1, k);
  scanf("%d", &q);
  for (int i = 1; i <= q; ++i) {
    long long t, a;
    t = in();
    a = in();
    int pos = getpos(t);
    int where;
    int mid = (1 + k) / 2;
    if (pos > mid) {
      int mia = getminnA(1, mid + 1, pos);
      int mib = getminnB(1, mid + 1, pos);
      long long w1 = -a, w2 = a - X;
      if (mia <= w1 || mib <= w2)
        where = getmin(1, pos, a);
      else
        where = getmin(1, mid, a);
    } else
      where = getmin(1, pos, a);
    if (where == k + 1) {
      long long zhi = a + sum1[pos];
      if (pos & 1)
        zhi = zhi + t - rev[pos];
      else
        zhi = zhi - (t - rev[pos]);
      if (zhi > X) zhi = X;
      if (zhi < 0) zhi = 0;
      printf("%lld\n", zhi);
      continue;
    }
    if (where & 1) {
      long long zhi = sum1[pos] - sum1[where];
      if (pos & 1)
        zhi = zhi + t - rev[pos];
      else
        zhi = zhi - (t - rev[pos]);
      if (zhi > X) zhi = X;
      if (zhi < 0) zhi = 0;
      printf("%lld\n", zhi);
    } else {
      long long zhi = sum1[pos] - sum1[where] + X;
      if (pos & 1)
        zhi = zhi + t - rev[pos];
      else
        zhi = zhi - (t - rev[pos]);
      if (zhi > X) zhi = X;
      if (zhi < 0) zhi = 0;
      printf("%lld\n", zhi);
    }
  }
  return 0;
}
