#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long Bpow(long long a, long long s) {
  if (s == 0) {
    return 1;
  }
  long long u = Bpow(a, s / 2);
  if (s & 1)
    return u * u % mod * a % mod;
  else
    return u * u % mod;
}
int32_t main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  long long mx = a.back();
  long long mi = a[0];
  vector<long long> r(n - 1);
  for (long long i = 0; i < n - 1; i++) {
    r[i] = a[i + 1] - a[i] - 1;
  }
  sort(r.begin(), r.end());
  vector<long long> s(n - 1);
  if (n > 1) {
    s[n - 2] = r[n - 2];
    for (long long i = n - 3; i >= 0; i--) {
      s[i] = s[i + 1] + r[i];
    }
  }
  long long q;
  cin >> q;
  vector<long long> ans;
  while (q--) {
    long long l, c;
    cin >> l >> c;
    if (n == 1) {
      ans.push_back(c - l + 1);
      continue;
    }
    long long uk = upper_bound(r.begin(), r.end(), c - l) - r.begin();
    long long rez = 0;
    if (uk != n - 1) rez -= s[uk] - (c - l) * (n - 1 - uk);
    rez += mx + c - l - mi + 1;
    ans.push_back(rez);
  }
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
}
