#include <bits/stdc++.h>
using namespace std;
long long sum[100002];
int r[100002], lo[100002], hi[100002];
int x, k;
void solve(int t, int a) {
  int i = upper_bound(r + 1, r + k + 2, t) - r - 1;
  int ans = sum[i] + (i % 2 ? 1 : -1) * (t - r[i]);
  if (a <= lo[i]) {
    ans += lo[i];
  } else if (a <= hi[i]) {
    ans += a;
  } else {
    ans += hi[i];
  }
  cout << min(max(ans, 0), x) << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> x >> k;
  for (int i = 1; i <= k; ++i) {
    cin >> r[i];
    sum[i] += sum[i - 1] + (i % 2 ? -1 : 1) * (r[i] - r[i - 1]);
  }
  r[k + 1] = 2e9;
  hi[0] = x;
  for (int i = 1; i <= k + 1; ++i) {
    if (i % 2) {
      lo[i] =
          (i == 1
               ? r[i]
               : min(max(lo[i - 2], r[i] - 2 * r[i - 1] + r[i - 2] + lo[i - 2]),
                     x));
      hi[i] = max(hi[i - 1], lo[i]);
    } else {
      hi[i] =
          max(min(hi[i - 2], hi[i - 2] - r[i] + 2 * r[i - 1] - r[i - 2]), 0);
      lo[i] = min(lo[i - 1], hi[i]);
    }
  }
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) {
    int t, a;
    cin >> t >> a;
    solve(t, a);
  }
  return 0;
}
