#include <bits/stdc++.h>
using namespace std;
long long a[100005], b[100005], sum[100005];
int main() {
  long long n;
  scanf("%lld", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 2; i <= n; i++) {
    b[i - 1] = a[i] - a[i - 1];
  }
  sort(b + 1, b + n);
  for (int i = 1; i < n; i++) sum[i] = sum[i - 1] + b[i];
  long long q, x, y, l, r;
  scanf("%lld", &q);
  while (q--) {
    scanf("%lld%lld", &x, &y);
    l = 0, r = y - x + 1;
    long long t = lower_bound(b + 1, b + n, r) - b - 1;
    printf("%lld\n", sum[t] + (r * (n - t)));
  }
}
