#include <bits/stdc++.h>
using namespace std;
long long A[100009], D[100009];
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) scanf("%lld", &A[i]);
  sort(A, A + N);
  N = unique(A, A + N) - A;
  vector<long long> S = {0};
  for (int i = 1; i < N; i++) S.push_back(A[i] - A[i - 1]);
  sort(S.begin(), S.end());
  for (int i = 1; i <= N; i++)
    D[i] = D[i - 1] + (S[i] - S[i - 1]) * (N - i + 1);
  int Q;
  scanf("%d", &Q);
  while (Q--) {
    long long l, r, d;
    scanf("%lld%lld", &l, &r);
    d = r - l;
    int k = upper_bound(S.begin(), S.end(), d) - S.begin() - 1;
    printf("%lld ", D[k] + 1LL * (d - S[k] + 1) * (N - k));
  }
  return 0;
}
