#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100000 + 100;
long long n, q, l, r;
long long c[maxn], d[maxn], pre[maxn];
int32_t main() {
  scanf("%I64d", &n);
  for (long long i = 1; i <= n; i++) scanf("%I64d", &c[i]);
  sort(c + 1, c + 1 + n);
  for (long long i = 1; i < n; i++) d[i] = c[i + 1] - c[i];
  sort(d + 1, d + n);
  for (long long i = 1; i < n; i++) pre[i] = pre[i - 1] + d[i];
  scanf("%I64d", &q);
  while (q--) {
    scanf("%I64d%I64d", &l, &r);
    long long k = upper_bound(d + 1, d + n, r - l + 1) - d;
    long long ans = pre[k - 1] + (r - l + 1) * (n - k + 1);
    printf("%I64d ", ans);
  }
  return 0;
}
