#include <bits/stdc++.h>
using namespace std;
long long n, q;
long long s[100005];
struct qry {
  long long l, r;
  long long idx;
} qq[100005];
long long ans[100005];
long long dif[100005];
bool cmp(const qry &a, const qry &b) { return ((a.r - a.l) > (b.r - b.l)); }
priority_queue<long long> pq;
int main() {
  scanf("%lld", &n);
  for (long long i = 0; i < n; i++) scanf("%lld", &s[i]);
  sort(s, s + n);
  scanf("%lld", &q);
  for (long long i = 0; i < n - 1; i++) dif[i] = s[i + 1] - s[i];
  for (long long i = 0; i < q; i++) {
    scanf("%lld %lld", &qq[i].l, &qq[i].r);
    qq[i].idx = i;
  }
  long long sum = 0;
  for (long long i = 0; i < n - 1; i++) {
    pq.push(dif[i]);
    sum += dif[i];
  }
  sort(qq, qq + q, cmp);
  for (long long i = 0; i < q; i++) {
    while (!pq.empty()) {
      long long x = pq.top();
      if (x > qq[i].r - qq[i].l + 1) {
        sum -= x;
        pq.pop();
      } else {
        break;
      }
    }
    ans[qq[i].idx] = sum + (n - (long long)pq.size()) * (qq[i].r - qq[i].l + 1);
  }
  for (long long i = 0; i < q; i++) printf("%lld ", ans[i]);
  return 0;
}
