#include <bits/stdc++.h>
#pragma GCC optimize("2,Ofast,inline")
using namespace std;
const int N = 1e5 + 10;
template <typename T>
T read(T &x) {
  int f = 0;
  register char c = getchar();
  while (c > '9' || c < '0') f |= (c == '-'), c = getchar();
  for (x = 0; c >= '0' && c <= '9'; c = getchar())
    x = (x << 3) + (x << 1) + (c ^ 48);
  if (f) x = -x;
  return x;
}
int n, m;
long long s[N], d[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) {
    d[i] = s[i + 1] - s[i];
  }
  d[n] = 3e18;
  sort(d + 1, d + n + 1);
  for (int i = 1; i <= n; ++i) {
    sum[i] = sum[i - 1] + d[i];
  }
  read(m);
  while (m--) {
    long long l, r;
    read(l);
    read(r);
    long long len = r - l + 1;
    long long pos = upper_bound(d + 1, d + n + 1, len) - d - 1;
    long long ans = sum[pos] + len * (n - pos);
    printf("%I64d ", ans);
  }
  puts("");
  return 0;
}
