#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
struct tree {
  int ma, mi, add;
} d[maxn << 2];
struct ques {
  int t, a, id, ans;
} q[maxn];
int n, m, Q, st = 1, now;
int t[maxn], ha[maxn], ans[maxn];
void pushdown(int o) {
  int ls = o << 1, rs = o << 1 | 1;
  d[ls].add += d[o].add;
  d[rs].add += d[o].add;
  if (d[o].ma) d[ls].ma = d[rs].ma = d[o].ma;
  if (d[o].mi) d[ls].mi = d[rs].mi = d[o].mi;
  d[o].add = d[o].ma = d[o].mi = 0;
}
void change(int o, int L, int R, int l, int r, int val, int flag) {
  if (l <= L && r >= R) {
    d[o].add += val * flag;
    if (flag == 1)
      d[o].ma = 1;
    else
      d[o].mi = 1;
    return;
  }
  int mid = (L + R) >> 1;
  if (l <= mid) change(o << 1, L, mid, l, r, val, flag);
  if (r > mid) change(o << 1 | 1, mid + 1, R, l, r, val, flag);
}
void down(int o, int l, int r) {
  if (l == r) {
    if (l < st) return;
    ans[l] += d[o].add;
    d[o].add = 0;
    if (d[o].ma)
      ans[l] = min(ans[l], n);
    else
      ans[l] = max(ans[l], 0);
    d[o].ma = d[o].mi = 0;
    return;
  }
  pushdown(o);
  int mid = (l + r) >> 1;
  down(o << 1, l, mid);
  down(o << 1 | 1, mid + 1, r);
}
int main() {
  scanf("%d", &n);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) scanf("%d", &t[i]);
  scanf("%d", &Q);
  for (int i = 1; i <= Q; i++) {
    scanf("%d%d", &q[i].t, &q[i].a);
    ans[i] = q[i].a;
    ha[i] = q[i].t;
  }
  for (int i = 1; i <= m; i++) {
    int pos = lower_bound(ha + 1, ha + Q + 1, t[i]) - ha - 1;
    while (ha[pos + 1] == t[i]) pos++;
    while (st <= pos) {
      if (!now)
        ans[st] = max(ans[st] - (q[st].t - t[i - 1]), 0);
      else
        ans[st] = min(ans[st] + (q[st].t - t[i - 1]), n);
      st++;
    }
    if (!now)
      change(1, 1, Q, st, Q, t[i] - t[i - 1], -1);
    else
      change(1, 1, Q, st, Q, t[i] - t[i - 1], 1);
    down(1, 1, Q);
    now ^= 1;
  }
  while (st <= Q) {
    if (!now)
      ans[st] = max(ans[st] - (q[st].t - t[m]), 0);
    else
      ans[st] = min(ans[st] + (q[st].t - t[m]), n);
    st++;
  }
  for (int i = 1; i <= Q; i++) printf("%d\n", ans[i]);
  return 0;
}
