#include <bits/stdc++.h>
using namespace std;
int rs[100000 + 10];
struct Q {
  int id;
  int t;
  int a;
  int res;
};
bool byT(const Q& a, const Q& b) { return a.t < b.t; }
bool byId(const Q& a, const Q& b) { return a.id < b.id; }
Q qs[100000 + 10];
int main(void) {
  int total;
  scanf("%d", &total);
  int nR;
  scanf("%d", &nR);
  for (int i = 0; i < (int)(nR); ++i) {
    scanf("%d", &rs[i + 1]);
  }
  rs[nR + 1] = 1000000009;
  int nQ;
  scanf("%d", &nQ);
  for (int i = 0; i < (int)(nQ); ++i) {
    scanf("%d%d", &qs[i].t, &qs[i].a);
    qs[i].id = i;
  }
  sort(qs, qs + nQ, byT);
  int a1 = 0;
  int a2 = total;
  int diff = 0;
  int iq = 0;
  bool aToB = true;
  for (int ir = 0; ir < (int)(nR + 1); ++ir) {
    while (iq < nQ && qs[iq].t < rs[ir + 1]) {
      qs[iq].res = (qs[iq].a < a1 ? a1 : qs[iq].a < a2 ? qs[iq].a : a2) + diff;
      qs[iq].res = min(
          total, max(0, qs[iq].res + (aToB ? -1 : 1) * (qs[iq].t - rs[ir])));
      ++iq;
    }
    if (aToB) {
      diff -= min(rs[ir + 1] - rs[ir], total);
      a1 = max(a1, -diff);
    } else {
      diff += min(rs[ir + 1] - rs[ir], total);
      a2 = min(a2, total - diff);
    }
    aToB = !aToB;
  }
  sort(qs, qs + nQ, byId);
  for (int i = 0; i < (int)(nQ); ++i) {
    printf("%d\n", qs[i].res);
  }
  return 0;
}
