#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.141592653589793238462643383279;
const long long MOD = 1e9 + 7;
const long double eps = 0.000000000000001;
vector<long long> a(1001);
long long h, n;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, q, l, r;
  cin >> n;
  vector<long long> a(n);
  vector<long long> del(n - 1);
  cin >> a[0];
  for (long long i = 1; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  for (long long i = 1; i < n; i++) {
    del[i - 1] = a[i] - a[i - 1];
  }
  vector<long long> res(n);
  sort(del.begin(), del.end());
  vector<long long> sums(n);
  sums[0] = 0;
  for (long long i = 1; i < n; i++) {
    sums[i] = sums[i - 1] + del[i - 1];
  }
  long long prom;
  cin >> q;
  for (long long i = 0; i < q; i++) {
    cin >> l >> r;
    prom = r - l + 1;
    l = -1;
    r = n - 1;
    long long ans = prom;
    long long m;
    while (r - l > 1) {
      m = l + (r - l) / 2;
      if (del[m] <= prom) {
        l = m;
      } else {
        r = m;
      }
    }
    ans += sums[r];
    ans += (n - (r + 1)) * prom;
    cout << ans << " ";
  }
  return 0;
}
