#include <bits/stdc++.h>
using namespace std;
long long x;
vector<long long> rev;
long long ptr = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> x;
  long long k;
  cin >> k;
  rev.push_back(0);
  for (long long i = 0; i < k; i++) {
    long long t;
    cin >> t;
    rev.push_back(t);
  }
  long long q;
  cin >> q;
  long long d = 0, u = x, dans = 0, uans = x;
  for (long long i = 0; i < q; i++) {
    long long t, a;
    cin >> t >> a;
    if (t >= rev[ptr + 1]) {
      if (ptr % 2 == 0) {
        dans -= (rev[ptr + 1] - rev[ptr]);
        if (dans < 0) {
          d += (-dans);
          dans = 0;
        }
        if (d > u) {
          d = u;
          uans = 0;
        } else {
          uans -= (rev[ptr + 1] - rev[ptr]);
        }
      } else {
        uans += (rev[ptr + 1] - rev[ptr]);
        if (uans > x) {
          u -= (uans - x);
          uans = x;
        }
        if (u < d) {
          u = d;
          dans = x;
        } else {
          dans += (rev[ptr + 1] - rev[ptr]);
        }
      }
      ptr++;
    }
    if (ptr % 2 == 0) {
      if (a >= u) {
        cout << max(0LL, uans - (t - rev[ptr])) << "\n";
      } else if (a <= d) {
        cout << max(0LL, dans - (t - rev[ptr])) << "\n";
      } else {
        long long stans = (a - d) + dans;
        cout << max(0LL, stans - (t - rev[ptr])) << "\n";
      }
    } else {
      if (a >= u) {
        cout << min(x, uans + (t - rev[ptr])) << "\n";
      } else if (a <= d) {
        cout << min(x, dans + (t - rev[ptr])) << "\n";
      } else {
        long long stans = (a - d) + dans;
        cout << min(x, stans + (t - rev[ptr])) << "\n";
      }
    }
  }
  return 0;
}
