#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5;
long long a[maxn], b[maxn], s[maxn];
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  int m = 1;
  for (int i = 2; i <= n; ++i) {
    if (a[i] - a[i - 1] > 1) {
      b[m++] = a[i] - a[i - 1] - 1;
    }
  }
  sort(b + 1, b + m);
  for (int i = 1; i < m; ++i) {
    s[i] = s[i - 1] + b[i];
  }
  int q;
  cin >> q;
  while (q--) {
    long long L, R;
    cin >> L >> R;
    long long x = R - L;
    int p = lower_bound(b + 1, b + m, x) - b;
    if (b[p] > x) --p;
    long long tot = a[n] + x - a[1] + 1;
    if (p == m) {
      cout << tot << endl;
      continue;
    }
    long long sum = s[m - 1] - s[p] - x * (m - p - 1);
    tot -= sum;
    cout << tot << ' ';
  }
  return 0;
}
