#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
long long int a[maxn];
long long int pre[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 0, q = 0;
  long long int l = 0ll, r = 0ll;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i + 1 < n; ++i) a[i] = a[i + 1] - a[i];
  sort(a, a + n - 1);
  pre[0] = 0ll;
  for (int i = 0; i + 1 < n; ++i) pre[i + 1] = pre[i] + a[i];
  cin >> q;
  while (q--) {
    cin >> l >> r;
    long long int d = r - l + 1;
    long long int pos = lower_bound(a, a + n - 1, d) - a;
    cout << (n - pos) * d + pre[pos] << " ";
  }
}
