#include <bits/stdc++.h>
using namespace std;
long long a[100005], pre[100005];
int main() {
  long long l, r;
  int n, q;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + 1 + n);
  for (int i = n; i >= 1; i--) a[i] -= a[i - 1];
  sort(a + 2, a + 1 + n);
  for (int i = 2; i <= n; i++) pre[i] = pre[i - 1] + a[i];
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    scanf("%lld%lld", &l, &r);
    long long temp = r - l + 1;
    int index = upper_bound(a + 2, a + n + 1, temp) - a - 1;
    long long res = temp * n - (temp * (index - 1) - pre[index]);
    printf("%lld", res);
    if (i != q - 1) printf(" ");
  }
}
