#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, q;
long long a[N], b[N], sum[N];
int main() {
  scanf("%d", &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];
  scanf("%d", &q);
  while (q--) {
    long long l, r;
    scanf("%lld%lld", &l, &r);
    int k = upper_bound(b + 1, b + n, r - l + 1) - b - 1;
    long long ret = sum[k] + (r - l + 1) * (n - k);
    printf("%lld ", ret);
  }
  puts("");
  return 0;
}
