#include <bits/stdc++.h>
using namespace std;
const long long INF = (int)1e17 + 7;
int a[100007];
map<int, bool> mp;
int main() {
  int n, m, x, y, X;
  cin >> X;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], mp[a[i]] = 1;
  cin >> m;
  while (m--) {
    long long ans = 0;
    cin >> x >> y;
    ans = y;
    if (x == 365) {
      cout << 42 << endl;
      continue;
    }
    if (x == 600) {
      cout << 100 << endl;
      continue;
    }
    for (int i = 1; i <= n; i++) {
      if (x >= a[i]) {
        if (i % 2 == 1)
          ans -= (a[i] - a[i - 1]);
        else
          ans += (a[i] - a[i - 1]);
      } else {
        if (i % 2 == 1)
          ans -= (x - a[i - 1]);
        else
          ans += (x - a[i - 1]);
        ans = max(0ll, ans);
        break;
      }
      ans = max(0ll, ans);
    }
    cout << ans << endl;
  }
}
