#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long n, q, l, r, x;
  cin >> n;
  set<long long> uniq;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    uniq.insert(x);
  }
  vector<long long> s;
  for (auto u : uniq) s.push_back(u);
  vector<long long> diff;
  diff.push_back(1000000000000000047);
  for (long long i = 0; i < s.size() - 1; i++)
    diff.push_back(s[i + 1] - s[i] - 1);
  sort(diff.begin(), diff.end());
  vector<long long> prefix;
  prefix.push_back(diff[0]);
  for (long long i = 1; i < diff.size(); i++)
    prefix.push_back(prefix.back() + diff[i]);
  prefix[prefix.size() - 1] = diff.back();
  cin >> q;
  vector<long long> res;
  set<pair<long long, long long> > bs;
  for (long long i = 0; i < diff.size(); i++) bs.insert({diff[i], i});
  while (q--) {
    cin >> l >> r;
    long long sz = r - l + 1;
    auto it = bs.upper_bound({sz, -1});
    if (it == bs.begin()) {
      res.push_back(uniq.size() * (sz));
    } else {
      it--;
      pair<long long, long long> p = *it;
      long long rem = uniq.size() - p.second - 1;
      res.push_back(uniq.size() + prefix[p.second] + rem * (sz - 1));
    }
  }
  cout << res[0];
  for (long long i = 1; i < res.size(); i++) cout << " " << res[i];
  cout << "\n";
}
