#include <bits/stdc++.h>
template <class T>
void PRT(const T _) {
  if (_ < 0) {
    putchar(45), PRT(-_);
    return;
  }
  if (_ >= 10) PRT(_ / 10);
  putchar(_ % 10 + 48);
}
template <class T>
void UPRT(const T _) {
  if (_ >= 10) UPRT(_ / 10);
  putchar(_ % 10 + 48);
}
constexpr int MN(2e5 + 7);
long long a[MN];
long long d[MN];
long long sum[MN];
int main() {
  int n;
  {
    char _c = getchar(), _v = 1;
    for (n = 0; _c < 48 || _c > 57; _c = getchar())
      if (_c == 45) _v = -1;
    for (; _c >= 48 && _c <= 57;
         n = (n << 1) + (n << 3) + _c - 48, _c = getchar())
      ;
    if (_v == -1) n = -n;
  }
  {
    auto _i = 0, _n = n;
    for (; _i < _n; ++_i) {
      char _c = getchar(), _v = 1;
      for (a[_i] = 0; _c < 48 || _c > 57; _c = getchar())
        if (_c == 45) _v = -1;
      for (; _c >= 48 && _c <= 57;
           a[_i] = (a[_i] << 1) + (a[_i] << 3) + _c - 48, _c = getchar())
        ;
      if (_v == -1) a[_i] = -a[_i];
    }
  }
  std::sort(a, a + n);
  n = std::unique(a, a + n) - a;
  for (auto i = 1, _r = n; i < _r; ++i) d[i] = a[i] - a[i - 1] - 1;
  std::sort(d + 1, d + n);
  for (auto i = 1, _r = n; i < _r; ++i) sum[i] = d[i] + sum[i - 1];
  int q;
  {
    char _c = getchar(), _v = 1;
    for (q = 0; _c < 48 || _c > 57; _c = getchar())
      if (_c == 45) _v = -1;
    for (; _c >= 48 && _c <= 57;
         q = (q << 1) + (q << 3) + _c - 48, _c = getchar())
      ;
    if (_v == -1) q = -q;
  }
  while (q--) {
    long long l, r;
    {
      char _c = getchar(), _v = 1;
      for (l = 0; _c < 48 || _c > 57; _c = getchar())
        if (_c == 45) _v = -1;
      for (; _c >= 48 && _c <= 57;
           l = (l << 1) + (l << 3) + _c - 48, _c = getchar())
        ;
      if (_v == -1) l = -l;
    }
    {
      char _c = getchar(), _v = 1;
      for (r = 0; _c < 48 || _c > 57; _c = getchar())
        if (_c == 45) _v = -1;
      for (; _c >= 48 && _c <= 57;
           r = (r << 1) + (r << 3) + _c - 48, _c = getchar())
        ;
      if (_v == -1) r = -r;
    }
    long long cnt = r - l;
    int k = std::upper_bound(d + 1, d + n, cnt) - (d + 1);
    long long ans = n;
    ans += sum[k];
    ans += cnt * (n - 1 - k);
    ans += cnt * 1;
    UPRT(ans), putchar(32);
  }
  return 0;
}
