#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int MAXN = 300005, Mo = 1000000007;
struct list {
  int l, lt[MAXN], nt[MAXN * 2], x[MAXN * 2], y[MAXN * 2];
  void clear() {
    l = 1;
    memset(lt, 0, sizeof(lt));
  }
  void addedge(int a, int b, int c) {
    l++;
    nt[l] = lt[a];
    lt[a] = l;
    x[l] = b;
    y[l] = c;
  }
} E;
int n, m, q, l, b[MAXN], c[MAXN], a[MAXN], r[MAXN], t[MAXN], ans[MAXN];
int main() {
  n = read();
  m = read();
  r[0] = 0;
  for (int i = (1); i <= (m); ++i) r[i] = read();
  q = read();
  for (int i = (1); i <= (q); ++i) {
    t[i] = read();
    a[i] = read();
  }
  b[1] = 0;
  b[2] = n;
  c[1] = 0;
  c[2] = n;
  l = 1;
  for (int i = (1); i <= (q); ++i) {
    while (l <= m && r[l] <= t[i]) {
      int T = r[l] - r[l - 1];
      if (T <= min(c[1], c[2]))
        for (int k = (1); k <= (2); ++k) c[k] = n - (c[k] - T);
      else if (T >= max(c[1], c[2])) {
        c[1] = c[2] = n;
        b[1] = 0;
        b[2] = n;
      } else {
        if (c[1] < T) {
          b[1] += T - c[1];
          c[1] = n;
          c[2] = n - (c[2] - T);
        } else {
          b[2] -= T - c[2];
          c[2] = n;
          c[1] = n - (c[1] - T);
        }
      }
      l++;
    }
    int T = t[i] - r[l - 1];
    if (T >= max(c[1], c[2]))
      printf("%d\n", (l & 1) ? 0 : n);
    else if (T <= min(c[1], c[2])) {
      int tmp;
      if (a[i] <= b[1])
        tmp = c[1] - T;
      else if (a[i] >= b[2])
        tmp = c[2] - T;
      else {
        if (c[1] < c[2])
          tmp = c[1] + a[i] - b[1];
        else
          tmp = c[1] - a[i] + b[1];
        tmp -= T;
      }
      printf("%d\n", (l & 1) ? tmp : n - tmp);
    } else {
      int tmp;
      if (c[1] < T)
        tmp = c[1] + a[i] - b[1];
      else
        tmp = c[1] - a[i] + b[1];
      if (tmp > T)
        tmp -= T;
      else
        tmp = 0;
      printf("%d\n", (l & 1) ? tmp : n - tmp);
    }
  }
  return 0;
}
