#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long 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 long long MAXN = 300005, Mo = 1000000007;
struct list {
  long long l, lt[MAXN], nt[MAXN * 2], x[MAXN * 2], y[MAXN * 2];
  void clear() {
    l = 1;
    memset(lt, 0, sizeof(lt));
  }
  void addedge(long long a, long long b, long long c) {
    l++;
    nt[l] = lt[a];
    lt[a] = l;
    x[l] = b;
    y[l] = c;
  }
} E;
long long 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 (long long i = (1); i <= (m); ++i) r[i] = read();
  q = read();
  for (long long 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 (long long i = (1); i <= (q); ++i) {
    while (l <= m && r[l] <= t[i]) {
      long long T = r[l] - r[l - 1];
      if (T <= min(c[1], c[2]))
        c[1] = n - (c[1] - T), c[2] = n - (c[2] - 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++;
    }
    long long T = t[i] - r[l - 1], tmp;
    if (a[i] <= b[1])
      tmp = c[1];
    else if (a[i] >= b[2])
      tmp = c[2];
    else {
      if (c[1] < c[2])
        tmp = c[1] + a[i] - b[1];
      else
        tmp = c[1] - a[i] + b[1];
    }
    if (tmp > T)
      tmp -= T;
    else
      tmp = 0;
    printf("%lld\n", (l & 1) ? tmp : n - tmp);
  }
  return 0;
}
