#include <bits/stdc++.h>
using namespace std;
int X, K, Q;
int r[100001];
int dif[100001];
int sum[100001];
int t, a;
int times;
int main() {
  cin >> X >> K;
  for (int(i) = (1); (i) < (K + 1); (i)++) cin >> r[i];
  r[K + 1] = 999999999;
  for (int((i)) = (0); ((i)) < ((K)); ((i))++) dif[i] = r[i + 1] - r[i];
  for (int((i)) = (0); ((i)) < ((K)); ((i))++)
    sum[i + 1] = sum[i] + (i % 2 ? dif[i] : -dif[i]);
  cin >> Q;
  for (int((i)) = (0); ((i)) < ((Q)); ((i))++) {
    cin >> t >> a;
    times = 1;
    int cons;
    while (r[times] < t) {
      cons = sum[times - 1] + a;
      if (cons < 0) a = -sum[times - 1];
      if (cons > X) a = -sum[times - 1] + X;
      times++;
    }
    int ans = a + sum[times - 1];
    if (times % 2) {
      ans -= (t - r[times - 1]);
      ans = max(0, ans);
    } else {
      ans += (t - r[times - 1]);
      ans = min(ans, X);
    }
    cout << ans << endl;
  }
  cin >> Q;
  return 0;
}
