#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6;
long long arr[maxn];
long long ans[maxn];
long long lower1(long long start, long long end, long long value) {
  if (end >= start) {
    long long mid = start + (end - start) / 2;
    if (arr[mid] == value) return mid;
    if ((arr[mid] < value && arr[mid + 1] > value)) return mid;
    if (arr[mid] < value) return lower1(mid + 1, end, value);
    return lower1(start, mid - 1, value);
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long x;
  cin >> x;
  int k;
  cin >> k;
  for (int i = 0; i < k; i++) cin >> arr[i];
  ans[0] = -arr[0];
  for (int i = 1; i < k; i++) {
    ans[i] = arr[i] - arr[i - 1];
  }
  for (int i = 1; i < k; i++) {
    if (i % 2 == 1)
      ans[i] = ans[i - 1] + ans[i];
    else
      ans[i] = ans[i - 1] - ans[i];
  }
  int q;
  cin >> q;
  long long tm;
  long long ans1;
  long long a;
  for (int i = 0; i < q; i++) {
    cin >> tm;
    cin >> a;
    if (tm >= arr[0]) {
      int ind = lower1(0, k - 1, tm);
      ans1 = max(ans[ind] + a, 0ll);
      ans1 = min(ans1, x);
      if (i % 2 == 0) {
        ans1 += (-tm + arr[ind]);
        ans1 = max(ans1, 0ll);
      } else {
        ans1 += (tm - arr[ind]);
        ans1 = min(ans1, x);
      }
    } else {
      ans1 = min(x, a - tm);
      ans1 = max(0ll, ans1);
    }
    cout << ans1 << endl;
  }
  return 0;
}
