#include <bits/stdc++.h>
using namespace std;
const int maxn = 100050;
long long A[maxn], B[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &A[i]);
  sort(A, A + n);
  for (int i = 0; i < n - 1; i++) A[i] = A[i + 1] - A[i];
  sort(A, A + n - 1);
  for (int i = n - 1; i >= 1; i--) A[i] = A[i - 1];
  A[0] = 0;
  for (int i = 1; i < n; i++) B[i] = B[i - 1] + (A[i] - A[i - 1]) * (n + 1 - i);
  int q;
  scanf("%d", &q);
  while (q--) {
    long long l, r;
    scanf("%lld%lld", &l, &r);
    long long tmp = lower_bound(A, A + n, r - l + 1) - A - 1;
    printf("%lld ", B[tmp] + (n - tmp) * (r - l + 1 - A[tmp]));
  }
  return 0;
}
