#include <bits/stdc++.h>
const int MAXN = 100005;
long long s[MAXN], d[MAXN];
std::map<long long, int> cnt;
struct P {
  long long fr, st;
  int k;
  P(long long fr, long long st, int k) : fr(fr), st(st), k(k) {}
  bool operator<(const P &rhs) const {
    return fr == rhs.fr ? (st == rhs.st ? k < rhs.k : st < rhs.st)
                        : fr < rhs.fr;
  }
};
std::vector<P> vec;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &s[i]);
  std::sort(s, s + n);
  n = std::unique(s, s + n) - s;
  for (int i = 1; i < n; i++) {
    d[i - 1] = s[i] - s[i - 1];
    ++cnt[d[i - 1]];
  }
  int R = n;
  long long S = n;
  long long last = 0;
  vec.emplace_back(0, S, R);
  for (auto i : cnt) {
    S += R * (i.first - last) - i.second;
    last = i.first;
    R -= i.second;
    vec.emplace_back(i.first, S, R);
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    long long l, r;
    scanf("%lld %lld", &l, &r);
    r -= l;
    auto t = *(
        std::upper_bound(vec.begin(), vec.end(), P(r, LLONG_MAX, INT_MAX)) - 1);
    long long ans = t.st + (r - t.fr) * t.k;
    printf("%lld ", ans);
  }
  puts("");
  return 0;
}
