#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k, ai;
  cin >> n >> k;
  vector<long long> data;
  data.push_back(0);
  for (long long i = 0; i < k; i++) {
    cin >> ai;
    data.push_back(ai);
  }
  data.push_back(INF);
  long long q;
  cin >> q;
  vector<pair<long long, long long> > qv(n);
  for (long long i = 0; i < q; i++) {
    long long f, s;
    cin >> f >> s;
    pair<long long, long long> p = make_pair(f, s);
    qv[i] = p;
  }
  long long l = 0;
  long long r = n;
  long long uf = 1, us = 1;
  long long u = 0;
  bool mins = true;
  vector<long long> answers(q);
  for (long long i = 1; i <= k + 1; i++) {
    while (u < q && qv[u].first < data[i]) {
      long long diff = qv[u].first - data[i - 1];
      long long old;
      if (r == l)
        old = l;
      else {
        if (qv[u].second < uf)
          old = l;
        else if (qv[u].second > n - us)
          old = r;
        else
          old = l + (qv[u].second - uf) + 1;
      }
      if (mins)
        old -= diff;
      else
        old += diff;
      if (old < 0) old = 0;
      if (old > n) old = n;
      answers[u] = old;
      u++;
    }
    if (i > k) break;
    if (mins) {
      l -= (data[i] - data[i - 1]);
      if (l < 0) {
        uf -= l;
        l = 0;
      }
      r -= (data[i] - data[i - 1]);
      if (r < 0) r = 0;
    } else {
      r += (data[i] - data[i - 1]);
      if (r > n) {
        us += (r - n);
        r = n;
      }
      l += (data[i] - data[i - 1]);
      if (l > n) l = n;
    }
    mins ^= 1;
  }
  for (long long i = 0; i < q; i++) {
    cout << answers[i] << endl;
  }
  return 0;
}
