#include <bits/stdc++.h>
using namespace std;
const int MX = 1e5 + 50;
long long n;
map<long long, long long> mp;
long long a[MX], b[MX], d[MX], dist[MX], sum[MX];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int len1 = unique(a, a + n) - a;
  for (int i = 1; i < len1; i++) {
    dist[i - 1] = a[i] - a[i - 1];
    if (!mp.count(dist[i - 1]))
      mp[dist[i - 1]] = 1;
    else
      mp[dist[i - 1]]++;
  }
  sort(dist, dist + len1 - 1);
  int i = 0;
  for (auto iter = mp.begin(); iter != mp.end(); iter++) {
    b[i++] = iter->second;
  }
  int len = unique(dist, dist + len1 - 1) - dist;
  sum[0] = dist[0] * b[0];
  d[0] = b[0];
  for (int i = 1; i < len; i++) {
    sum[i] = sum[i - 1] + dist[i] * b[i];
    d[i] = d[i - 1] + b[i];
  }
  int T;
  cin >> T;
  int f = 0;
  while (T--) {
    if (f) cout << " ";
    f++;
    long long l, r;
    cin >> l >> r;
    int p = lower_bound(dist, dist + len, r - l + 1) - dist;
    p--;
    if (p < 0 || len == 0) {
      cout << len1 * (r - l + 1);
      continue;
    }
    long long add = sum[p];
    long long ans = add + (len1 - d[p]) * (r - l + 1);
    cout << ans;
  }
  cout << endl;
}
