#include <bits/stdc++.h>
using namespace std;
int x, n, m;
int a[100005];
int c[100005];
int d[100005];
void pan(int &w) {
  if (w < 0) {
    w = 0;
  }
  if (n > x) {
    w = x;
  }
}
int main() {
  while (~scanf("%d", &x)) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    scanf("%d", &m);
    for (int i = 1; i <= m; i++) {
      scanf("%d%d", &c[i], &d[i]);
    }
    int l = 1, vis = -1, sum;
    int num = 0, ans = x, num1 = 0;
    for (int i = 1; i <= m; i++) {
      while (l <= n && a[l] <= c[i]) {
        sum = (a[l] - a[l - 1]) * vis;
        ans += sum;
        num1 += sum;
        num += sum;
        pan(ans);
        pan(num1);
        l++;
        vis *= -1;
      }
      int p = d[i] + num;
      int q = (c[i] - a[l - 1]) * vis;
      if (p < num1) {
        p = num1;
      }
      if (p > ans) {
        p = ans;
      }
      p += q;
      pan(p);
      printf("%d\n", p);
    }
  }
}
