#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll x, k, q;
  cin >> x >> k;
  vector<ll> r(k + 1), rs(k + 1);
  for (int i = (1); i < (k + 1); i++) {
    cin >> r[i];
    rs[i] = rs[i - 1] - (r[i] - r[i - 1]) * (i % 2 ? 1 : -1);
  }
  int cur = 0;
  0;
  cin >> q;
  pair<ll, ll> area = {0, x};
  ll lb = 0, ub = x;
  ll lpos = 0, upos = 0;
  for (int i = (0); i < (q); i++) {
    ll t, a;
    cin >> t >> a;
    while (cur != k && r[cur + 1] < t) {
      cur++;
      pair<ll, ll> brea = area;
      brea.first += (r[cur] - r[cur - 1]) * (cur % 2 ? 1 : -1);
      brea.second += (r[cur] - r[cur - 1]) * (cur % 2 ? 1 : -1);
      brea.first = max(brea.first, 0ll);
      brea.second = min(brea.second, x);
      if (brea.first == 0) {
        ll tmp = r[cur] - r[cur - 1] - area.first;
        ub -= tmp;
        upos = cur;
      } else if (brea.second == x) {
        ll tmp = r[cur] - r[cur - 1] + area.second - x;
        lb += tmp;
        lpos = cur;
      }
      area = brea;
    }
    if (a <= lb && ub <= a) {
      if (lpos > upos) {
        a = rs[cur] - rs[lpos] + (t - r[cur]) * (cur % 2 ? 1 : -1);
      } else {
        a = x + rs[cur] - rs[upos] + (t - r[cur]) * (cur % 2 ? 1 : -1);
      }
    } else if (a <= lb) {
      a = rs[cur] - rs[lpos] + (t - r[cur]) * (cur % 2 ? 1 : -1);
    } else if (ub <= a) {
      a = x + rs[cur] - rs[upos] + (t - r[cur]) * (cur % 2 ? 1 : -1);
    } else {
      a += rs[cur] + (t - r[cur]) * (cur % 2 ? 1 : -1);
    }
    a = max(0ll, a);
    a = min(a, x);
    cout << a << endl;
    0;
  }
  return 0;
}
