#include <bits/stdc++.h>
using namespace std;
bool pairCompareSecond(const pair<long long, long long>& firstEl,
                       const pair<long long, long long>& secondEl) {
  return firstEl.second > secondEl.second;
}
const long long MOD = 1000000007;
const long long INF = 1000000007;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const double EPS = 0.000000001;
long long x;
const long long MAX_k = 100000;
long long k, r[MAX_k + 1];
long long t_intval[MAX_k + 1];
const long long MAX_q = 100000;
long long q, t[MAX_q], a[MAX_q];
signed main() {
  cin >> x;
  cin >> k;
  r[0] = 0;
  for (long long i = 0; i < k; i++) {
    cin >> r[i + 1];
  }
  cin >> q;
  for (long long i = 0; i < q; i++) {
    cin >> t[i] >> a[i];
  }
  t_intval[0] = r[0];
  for (long long i = 0; i < q; i++) {
    t_intval[i + 1] = r[i + 1] - r[i];
  }
  for (long long i = 0; i < q; i++) {
    long long ans = a[i];
    for (long long j = 1; j < k + 1; j++) {
      if (r[j] <= t[i]) {
        if (j % 2 == 1) {
          ans = max(ans - t_intval[j], 0LL);
        } else {
          ans = min(ans + t_intval[j], x);
        }
        continue;
      }
      if (j % 2 == 1) {
        ans = max(ans - (t[i] - r[j - 1]), 0LL);
      } else {
        ans = min(ans + (t[i] - r[j - 1]), x);
      }
      break;
    }
    cout << ans << endl;
  }
  return 0;
}
