#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
inline void read(Tp &x) {
  static char c;
  static bool neg;
  x = 0, c = getchar(), neg = false;
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (neg) {
    x = -x;
  }
}
const int N = 100000 + 5;
int n, q;
long long s[N], diff[N], sum[N];
int main() {
  read(n);
  for (int i = 1; i <= n; ++i) {
    read(s[i]);
  }
  sort(s + 1, s + n + 1);
  for (int i = 1; i < n; ++i) {
    diff[i] = s[i + 1] - s[i];
  }
  sort(diff + 1, diff + n);
  for (int i = 1; i < n; ++i) {
    sum[i] = sum[i - 1] + diff[i];
  }
  read(q);
  long long l, r;
  for (int i = 1, pos; i <= q; ++i) {
    read(l), read(r);
    r -= l - 1;
    pos = lower_bound(diff + 1, diff + n, r) - diff;
    printf("%lld\n", sum[pos - 1] + (long long)(n - pos + 1) * r);
  }
}
