#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class A, size_t N, class T>
void Fill(A (&a)[N], const T &v) {
  fill((T *)a, (T *)(a + N), v);
}
const long long int INF = 0x3fffffff;
int main() {
  int first, K, Q, ans = 0;
  int r[100005] = {};
  int t[100005], a[100005];
  cin >> first >> K;
  for (int i = 0; i < (K); i++) cin >> r[i + 1];
  cin >> Q;
  for (int i = 0; i < (Q); i++) cin >> t[i] >> a[i];
  map<int, int> mp;
  for (int i = 0; i < (K + 1); i++) mp[r[i]] = i;
  int s[2][100005] = {}, b[100005] = {};
  s[0][0] = 0;
  s[1][0] = first;
  for (int i = 0; i < (K); i++) {
    int time = r[i + 1] - r[i];
    if (i % 2) {
      int x = first - time - b[i];
      s[0][i + 1] = s[0][i];
      s[1][i + 1] = min(s[1][i], x);
      b[i + 1] = b[i] + time;
    } else {
      int x = 0 + time - b[i];
      s[0][i + 1] = max(s[0][i], x);
      s[1][i + 1] = s[1][i];
      b[i + 1] = b[i] - time;
    }
  }
  for (int i = 0; i < (Q); i++) {
    auto it = mp.lower_bound(t[i] + 1);
    it--;
    int d = t[i] - it->first;
    int n = it->second;
    int ans = 0;
    if (a[i] < s[0][n]) {
      ans = s[0][n] + b[n];
    } else if (a[i] > s[1][n]) {
      ans = s[1][n] + b[n];
    } else {
      ans = a[i] + b[n];
    }
    if (n % 2) {
      ans = min(first, ans + d);
    } else {
      ans = max(0, ans - d);
    }
    cout << ans << endl;
  }
  return 0;
}
