#include <bits/stdc++.h>
using namespace std;
long long fun(vector<long long> &v, long long w) {
  long long l = 0, r = (long long)v.size() - 1;
  long long ans = -1;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (v[mid] <= w) {
      ans = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long &i : v) {
    cin >> i;
  }
  sort(v.begin(), v.end());
  vector<long long> p;
  for (int i = 0; i < n; i++) {
    if (i == 0 || v[i] != p[p.size() - 1]) {
      p.push_back(v[i]);
    }
  }
  v = p;
  n = v.size();
  vector<long long> t(n);
  for (long long i = 1; i < n; i++) {
    t[i] = v[i] - v[i - 1];
  }
  sort(t.begin(), t.end());
  vector<long long> cu(n);
  for (long long i = 1; i < n; i++) {
    cu[i] = t[i] + cu[i - 1];
  }
  long long q;
  cin >> q;
  while (q--) {
    long long ans = 0;
    long long l, r;
    cin >> l >> r;
    long long w = r - l + 1;
    ans += w;
    long long in = fun(t, w);
    ans += cu[in];
    ans += w * ((long long)t.size() - in - 1);
    cout << ans << " ";
  }
}
