#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
int main() {
  int X, k, Q;
  cin >> X >> k;
  std::vector<int> r(k + 2, (1 << 30));
  for (int i = 0; i < k; i++) cin >> r[i + 1];
  r[0] = 0;
  cin >> Q;
  int tap = 0, lis = X;
  int low = 0, high = X;
  int cnt = 0, sum = 0;
  for (int i = 0; i < Q; i++) {
    int t, a;
    cin >> t >> a;
    while (r[cnt + 1] <= t) {
      int d = r[cnt + 1] - r[cnt];
      sum += d;
      if (cnt % 2) {
        int uku = std::max(0, lis + d - X);
        high -= uku;
        tap = std::max(0, std::min(X, tap + d));
        lis = std::max(0, std::min(X, lis + d));
      } else {
        int luz = std::max(0, -(tap - d));
        low += luz;
        tap = std::max(0, std::min(X, tap - d));
        lis = std::max(0, std::min(X, lis - d));
      }
      cnt += 1;
    }
    int d = t - r[cnt];
    if (cnt % 2) {
      if (a >= high)
        cout << std::max(0, std::min(X, lis + d)) << endl;
      else if (a > low)
        cout << std::max(0, std::min(X, a + sum + d)) << endl;
      else
        cout << std::max(0, std::min(X, tap + d)) << endl;
    } else {
      if (a >= high)
        cout << std::max(0, std::min(X, lis - d)) << endl;
      else if (a > low)
        cout << std::max(0, std::min(X, a + sum - d)) << endl;
      else
        cout << std::max(0, std::min(X, tap - d)) << endl;
    }
  }
  return 0;
}
