#include <bits/stdc++.h>
using namespace std;
int n, q;
long long s[1000005];
long long l[1000005];
long long o[1000005];
void solve(long long x, long long y) {
  long long len = y - x + 1;
  int i = lower_bound(l, l + n - 1, len) - l;
  printf("%I64d ", (n - i) * len + o[i]);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", s + i);
  }
  sort(s, s + n);
  for (int i = 0; i < n - 1; i++) {
    l[i] = s[i + 1] - s[i];
  }
  l[n - 1] = 1000000000000000007ll;
  sort(l, l + n);
  o[0] = 0;
  for (int i = 1; i < n; i++) {
    o[i] = o[i - 1] + l[i - 1];
  }
  scanf("%d", &q);
  for (int Q = 0; Q < q; Q++) {
    long long x, y;
    scanf("%I64d%I64d", &x, &y);
    solve(x, y);
  }
  return 0;
}
