#include <bits/stdc++.h>
using namespace std;
template <typename T>
void fill_all(T& arr, const T& v) {
  arr = v;
}
template <typename T, typename ARR>
void fill_all(ARR& arr, const T& v) {
  for (auto& i : arr) {
    fill_all(i, v);
  }
}
long long comb[50 + 1][50 + 1];
long long int par[100000], depth[100000];
static void calc_comb() {
  for (uint32_t i = 0; i <= 50; i++) {
    for (uint32_t j = 0; j <= i; j++) {
      if ((j == 0) || (i == j)) {
        comb[i][j] = 1;
      } else {
        comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
      }
    }
  }
}
int main() {
  long long int x, k, q, zero[10000], one[10000];
  vector<long long int> r;
  cin >> x >> k;
  for (long long int i = (0); i < (k); ++i) {
    long long int aa;
    cin >> aa;
    r.push_back(aa);
  }
  one[0] = x;
  for (long long int i = 1; i < k; i++) {
    one[i] = one[i - 1] - (r[i] - r[i - 1]);
    if (one[i] < 0) {
      one[i] = 0;
    }
    one[i] = x - one[i];
  }
  zero[0] = 0;
  for (long long int i = 1; i < k; i++) {
    zero[i] = zero[i - 1] - (r[i] - r[i - 1]);
    if (zero[i] < 0) {
      zero[i] = 0;
    }
    zero[i] = x - zero[i];
  }
  cin >> q;
  for (long long int i = (0); i < (q); ++i) {
    long long int t, a;
    cin >> t >> a;
    vector<long long int>::iterator it = lower_bound(r.begin(), r.end(), t);
    long long int aaa = distance(r.begin(), it);
    if (zero[aaa] + r[2] > x) {
      cout << zero[aaa] + r[2] - x << endl;
    } else {
      cout << zero[aaa] + r[2] << endl;
    }
  }
  return 0;
}
