#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long a[maxn];
long long b[maxn];
long long sum[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  sort(a + 1, a + 1 + n);
  int cnt = unique(a + 1, a + 1 + n) - (a + 1);
  long long l = a[1], r = a[cnt];
  for (int i = 1; i < cnt; i++) {
    b[i] = a[i + 1] - a[i] - 1;
  }
  sort(b + 1, b + cnt);
  for (int i = 1; i < cnt; i++) {
    sum[i] = sum[i - 1] + b[i];
  }
  int q;
  cin >> q;
  while (q--) {
    long long L, R;
    scanf("%I64d%I64d", &L, &R);
    long long d = R - L;
    int pos = lower_bound(b + 1, b + cnt, d) - b;
    if (pos == cnt) {
      cout << d + (r - l + 1) << " ";
    } else
      cout << d + (r - l + 1) - (sum[cnt - 1] - sum[pos - 1]) +
                  d * (cnt - 1 - pos + 1)
           << " ";
  }
  return 0;
}
