#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int INF = 0x3f3f3f3f;
int Q, k, mid;
long long x;
long long ri[MAXN], ti, ai, temp;
long long boo[MAXN];
long long A[MAXN];
long long B[MAXN];
long long ef(long long ti) {
  int l = 1;
  int r = k;
  int mid = 0;
  while (l <= r) {
    mid = (l + r) / 2;
    if (ri[mid] > ti)
      r = mid - 1;
    else if (ri[mid] < ti)
      l = mid + 1;
    else
      return mid;
  }
  return l - 1;
}
int main() {
  while (~scanf("%lld", &x)) {
    memset(A, 0, sizeof(A));
    memset(B, 0, sizeof(B));
    scanf("%d", &k);
    ri[0] = 0;
    for (int i = 1; i <= k; i++) {
      scanf("%lld", &ri[i]);
      if (i % 2 == 1) {
        boo[i] = -1;
      } else {
        boo[i] = 1;
      }
    }
    A[0] = 0;
    B[0] = x;
    for (int i = 1; i <= k; i++) {
      A[i] = boo[i] * (ri[i] - ri[i - 1]) + A[i - 1];
      B[i] = (boo[i] * -1) * (ri[i] - ri[i - 1]) + B[i - 1];
    }
    scanf("%d", &Q);
    while (Q--) {
      scanf("%lld %lld", &ti, &ai);
      if (ti == 0) {
        printf("%lld\n", ai);
        continue;
      }
      if (ti < ri[1]) {
        if (ai >= ti) {
          printf("%lld\n", ai - ti);
        } else {
          printf("0\n");
        }
        continue;
      }
      mid = ef(ti);
      if (ri[mid] == ti) {
        if (ai + A[mid] > 0)
          printf("%lld\n", ai + A[mid]);
        else
          printf("0\n");
      } else {
        temp = ai + A[mid];
        if (temp < 0) {
          temp = 0;
        }
        if (boo[mid] == 1) {
          if (temp - (ti - ri[mid]) > 0) {
            printf("%lld\n", temp - (ti - ri[mid]));
          } else {
            printf("0\n");
          }
        } else {
          if (temp + (ti - ri[mid]) > 0) {
            printf("%lld\n", temp + (ti - ri[mid]));
          } else {
            printf("0\n");
          }
        }
      }
    }
  }
  return 0;
}
