#include <bits/stdc++.h>
using namespace std;
int main() {
  long long X;
  int K, Q;
  cin >> X;
  cin >> K;
  vector<long long> r(K);
  vector<long long> diff_r(K);
  cin >> r[0];
  diff_r[0] = r[0];
  for (int i = 1; i < K; i++) {
    cin >> r[i];
    diff_r[i] = r[i] - r[i - 1];
  }
  cin >> Q;
  long long start = 0;
  int j_start = 0;
  for (int i = 0; i < Q; i++) {
    long long a, t;
    cin >> t >> a;
    if (start != 0) {
      t -= start;
      if (j_start % 2 == 0) {
        a = 0;
      } else {
        a = X;
      }
    }
    for (int j = j_start; j < K; j++) {
      if (j % 2 == 0) {
        if (t > diff_r[j]) {
          if (a < diff_r[j]) {
            a = 0;
          } else {
            a -= diff_r[j];
          }
          t -= diff_r[j];
        } else {
          if (a < t) {
            a = 0;
          } else {
            a -= t;
          }
          t = 0;
          cout << a << endl;
          break;
        }
      } else {
        if (t > diff_r[j]) {
          if (X - a < diff_r[j]) {
            a = X;
          } else {
            a += diff_r[j];
          }
          t -= diff_r[j];
        } else {
          if (X - a < t) {
            a = X;
          } else {
            a += t;
          }
          t = 0;
          cout << a << endl;
          break;
        }
      }
      if (diff_r[j] >= X && j != j_start) {
        j_start = j;
        start = r[j];
      }
    }
    if (t > 0) {
      if (K % 2 == 0) {
        if (a < t) {
          a = 0;
        } else {
          a -= t;
        }
      } else {
        if (X - a < t) {
          a = X;
        } else {
          a += t;
        }
      }
      cout << a << endl;
    }
  }
  return 0;
}
