#include <bits/stdc++.h>
using namespace std;
long long r[100005];
int main() {
  long long x;
  scanf("%lld", &x);
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &r[i]);
  }
  int q;
  scanf("%d", &q);
  int i = 1, flag = -1;
  long long ll = 0, rr = x;
  while (q--) {
    long long v = 0, ans = 0, res = 0, tt = 0;
    long long t, a;
    scanf("%lld%lld", &t, &a);
    for (; i <= n && t >= r[i]; i++) {
      long long tmp = (r[i] - r[i - 1]) * flag;
      flag = -flag;
      v += tmp;
      ll += tmp;
      rr += tmp;
      if (ll < 0) ll = 0;
      if (ll > x) ll = x;
      if (rr < 0) rr = 0;
      if (rr > x) rr = x;
    }
    res = a + v;
    if (res < ll) res = ll;
    if (res > rr) res = rr;
    tt = (t - r[i - 1]) * flag;
    ans = tt + res;
    if (ans < 0) ans = 0;
    if (ans > x) ans = x;
    printf("%lld\n", ans);
  }
}
