#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    long long n;
    cin >> n;
    set<long long> s;
    for (long long i = 0; i < n; ++i) {
      long long x;
      cin >> x;
      s.insert(x);
    }
    vector<long long> a, b;
    for (auto x : s) {
      a.push_back(x);
    }
    sort(a.begin(), a.end());
    long long sz = a.size();
    for (long long i = 0; i < sz - 1; ++i) {
      b.push_back(a[i + 1] - a[i]);
    }
    sort(b.begin(), b.end());
    vector<long long> c(b.begin(), b.end());
    for (long long i = 1; i < c.size(); ++i) {
      c[i] += c[i - 1];
    }
    long long q;
    cin >> q;
    while (q--) {
      long long l, r;
      cin >> l >> r;
      long long diff = r - l;
      long long res = 0;
      long long id = upper_bound(b.begin(), b.end(), diff) - b.begin();
      if (id) res = c[id - 1];
      res += (sz - id) * (diff + 1);
      cout << res << " ";
    }
  }
  return 0;
}
