#include <bits/stdc++.h>
using namespace std;
inline long long min(long long a, long long b) { return (a > b) ? b : a; }
inline long long max(long long a, long long b) { return (a > b) ? a : b; }
const int N = 1e5 + 7;
const int inf = 1e9 + 7;
const long long linf = 1e18 + 9;
int r[N];
int dif[N];
long long tree[N], k;
long long pref[N];
long long get(int r) {
  long long res = 0;
  for (; r > 0; r -= (r & (-r))) {
    res += tree[r];
  }
  return res;
}
void update(int pos, int val) {
  for (; pos <= k; pos += (pos & (-pos))) {
    tree[pos] += val;
  }
}
int sum(int l, int r) { return get(r) - get(l - 1); }
int main() {
  int x;
  scanf("%d %d", &x, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", r + i);
    dif[i] = r[i] - r[i - 1];
    if (i & 1)
      update(i, -dif[i]);
    else
      update(i, dif[i]);
    pref[i] = pref[i - 1] + dif[i];
  }
  for (int i = 1; i <= k; i++) {
    printf("%d ", dif[i]);
  }
  puts("");
  int q;
  scanf("%d", &q);
  while (q--) {
    int t, a;
    scanf("%d %d", &t, &a);
    int up = lower_bound(pref + 1, pref + k + 1, t) - pref;
    long long res = get(up - 1) + a, sum = 0;
    if (up & 1)
      res -= (t - pref[up - 1]);
    else
      res += (t - pref[up - 1]);
    sum = a;
    long long qwe = 0;
    for (int i = 1; i <= up - 1; i++) {
      if (i & 1) {
        sum -= dif[i];
        if (sum < 0) {
          qwe += (abs(sum));
          sum = 0;
        }
      } else {
        sum += dif[i];
        if (sum > x) {
          qwe -= (sum - x);
          sum = x;
        }
      }
    }
    long long ans = res + qwe;
    if (ans > x)
      ans = x;
    else if (ans < 0)
      ans = 0;
    cout << ans << endl;
  }
}
