#include <bits/stdc++.h>
long long inf = 100000000000007;
using namespace std;
string alph = "abcdefghijklmnopqrstuvwxyz";
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
signed main() {
  long long x;
  cin >> x;
  long long k;
  cin >> k;
  long long re[100005] = {};
  long long ry[100005] = {};
  for (long long i = 1; i <= k; i++) {
    cin >> re[i];
    ry[i] = re[i] - re[i - 1];
  }
  long long q;
  cin >> q;
  long long t, a;
  for (long long i = 0; i < q; i++) {
    cin >> t >> a;
    long long s = 0;
    for (long long j = 1; j <= k; j++) {
      if (re[j] > t) {
        if (j % 2) {
          a -= t - re[j - 1];
          if (a < 0) a = 0;
        } else {
          a += t - re[j - 1];
          if (a > x) a = x;
        }
        s = 1;
        break;
      } else if (j % 2 == 1) {
        a -= ry[j];
        if (a < 0) a = 0;
      } else {
        a += ry[j];
        if (a > x) a = x;
      }
    }
    if (!s) {
      if (!k % 2) {
        a -= t - re[k - 1];
        if (a < 0) a = 0;
      } else {
        a += t - re[k - 1];
        if (a > x) a = x;
      }
    }
    cout << a << endl;
  }
  return 0;
}
