#include <bits/stdc++.h>
using namespace std;
long long int n, m;
long long int arr[300000];
long long int brr[300000];
array<long long int, 2> lim[300000];
long long int pref[300000];
map<long long int, long long int> ma;
map<long long int, long long int> mb;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int TESTS, q, a, s, b, l, r, c, k, p, h, w, d, x, y, z, xs, ys, t;
  TESTS = 1;
  while (TESTS--) {
    cin >> x;
    cin >> k;
    long long int prev = 0;
    for (long long int i = 0; i <= k - 1; i++) {
      cin >> arr[i];
      brr[i] = arr[i] - prev;
      prev = arr[i];
      if (i % 2 == 0) brr[i] *= -1;
    }
    array<long long int, 2> maxi = {(long long int)1e15, 0};
    array<long long int, 2> mini = {(long long int)-1e15, 0};
    cin >> q;
    long long int cur = 0;
    long long int val = 0;
    prev = 0;
    while (q--) {
      cin >> t >> a;
      long long int ind = upper_bound(arr, arr + k, t) - arr;
      ind--;
      if (a <= maxi[0] && a >= mini[0]) {
        val += a - prev;
        prev = a;
      } else {
        if (a > maxi[0]) {
          val += maxi[0] - prev;
          prev = maxi[0];
        } else {
          val += mini[0] - prev;
          prev = mini[0];
        }
      }
      val = max(val, 0ll);
      val = min(val, x);
      if (val == 0) mini = max(mini, {a, 0});
      if (val == x) maxi = min(maxi, {a, 0});
      for (long long int i = cur; i <= ind; i++) {
        val += brr[i];
        val = max(val, 0ll);
        val = min(val, x);
        if (val == 0) mini = max(mini, {a, 0});
        if (val == x) maxi = min(maxi, {a, 0});
      }
      long long int vall = val;
      if (ind % 2 == 0) {
        vall += t - arr[ind];
      } else
        vall += arr[ind] - t;
      vall = max(vall, 0ll);
      vall = min(vall, x);
      cur = ind + 1;
      cout << vall << "\n";
    }
  }
  return 0;
}
