#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const long long int linf = 1LL << 50;
const double EPS = 1e-10;
const int mod = 1e9 + 7;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
struct qu {
  long long int t, a;
  qu() {}
  qu(long long int t, long long int a) : t(t), a(a){};
};
long long int a[100001], b[100001], w[100001];
int main(int argc, char const *argv[]) {
  long long int X;
  cin >> X;
  int k;
  cin >> k;
  vector<long long int> r(k);
  for (int i = (0); i < (k); ++i) cin >> r[i];
  int q;
  cin >> q;
  vector<qu> vec(q);
  for (int i = (0); i < (q); ++i) cin >> vec[i].t >> vec[i].a;
  a[0] = 0, b[0] = X, w[0] = 0;
  for (int i = 0; i < k; i++) {
    long long int dt = r[i] - (i > 0 ? r[i - 1] : 0);
    if (i % 2 == 0) {
      if (b[i] + w[i] - dt <= 0) {
        a[i + 1] = 0, b[i + 1] = 0, w[i + 1] = 0;
      } else if (a[i] + w[i] - dt <= 0) {
        a[i + 1] = dt - w[i], b[i + 1] = b[i], w[i + 1] = w[i] - dt;
      } else {
        a[i + 1] = a[i], b[i + 1] = b[i], w[i + 1] = w[i] - dt;
      }
    } else {
      if (X - a[i] - w[i] - dt <= 0) {
        a[i + 1] = X, b[i + 1] = X, w[i + 1] = X;
      } else if (X - b[i] - w[i] - dt <= 0) {
        a[i + 1] = a[i], b[i + 1] = X - w[i] - dt, w[i + 1] = w[i] + dt;
      } else {
        a[i + 1] = a[i], b[i + 1] = b[i], w[i + 1] = w[i] + dt;
      }
    }
  }
  for (int i = (0); i < (q); ++i) {
    int index = upper_bound((r).begin(), (r).end(), vec[i].t) - r.begin();
    long long int res = w[index];
    if (vec[i].a <= a[index])
      res += a[index];
    else if (vec[i].a <= b[index])
      res += vec[i].a;
    else
      res += b[index];
    if (index % 2 == 1)
      res += vec[i].t - (index > 0 ? r[index - 1] : 0);
    else
      res -= vec[i].t - (index > 0 ? r[index - 1] : 0);
    if (res < 0) res = 0;
    if (res > X) res = X;
    cout << res << endl;
  }
  return 0;
}
