#include <bits/stdc++.h>
using namespace std;
int n, q;
long long a[100005], d[100005], sum[100005];
long long aans[100005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + 1 + n);
  for (int i = 1; i < n; i++) d[i] = a[i + 1] - a[i];
  sort(d + 1, d + n);
  for (int i = 1; i < n; i++) sum[i] = sum[i - 1] + d[i];
  scanf("%d", &q);
  for (int i = 1; i <= q; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    long long ttt = y - x;
    int L = 1, R = n - 1, ans = 0;
    while (L <= R) {
      int mid = (L + R) / 2;
      if (d[mid] <= ttt) {
        ans = mid;
        L = mid + 1;
      } else {
        R = mid - 1;
      }
    }
    aans[i] = sum[ans] + (n - ans) * (1 + ttt);
  }
  for (int i = 1; i <= q; i++) printf("%lld ", aans[i]);
  printf("\n");
  return 0;
}
