#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 10;
long long int n, q, a[M], d[M], s[M], l, r, len, k;
int main(int argc, char const *argv[]) {
  scanf("%lld", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n - 1; i++) d[i] = a[i + 1] - a[i];
  sort(d + 1, d + n);
  for (int i = 1; i <= n - 1; i++) s[i] = s[i - 1] + d[i];
  scanf("%lld", &q);
  while (q--) {
    scanf("%lld%lld", &l, &r);
    len = r - l + 1;
    k = lower_bound(d + 1, d + n, len) - d - 1;
    printf("%lld\n", len * (n - k) + s[k]);
  }
  return 0;
}
