#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(time(0));
bool isPrime(long long a) {
  long long i;
  for (i = 2; i * i <= a; i++) {
    if (a % i == 0) {
      return 0;
    }
  }
  return (a != 1);
}
bool isPalindrom(const string &s, int l, int r) {
  for (int i = 0; i < (r - l + 1) / 2; i++) {
    if (s[l + i] != s[r - i]) {
      return 0;
    }
  }
  return 1;
}
template <class type1>
type1 gcd(type1 a, type1 b) {
  type1 t;
  while (b) {
    t = b;
    b = a % b;
    a = t;
  }
  return a;
}
long long positiveMod(long long v, long long md) {
  v = v % md;
  if (v < 0) {
    v += md;
  }
  return v;
}
set<long long> ts;
vector<long long> dat;
vector<long long> dif;
vector<pair<long long, long long> > inf;
set<pair<long long, pair<long long, long long> > > inf_;
vector<long long> ress;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, q, i, j, a, b, sz, s, res;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a;
    ts.insert(a);
  }
  for (auto it : ts) {
    dat.push_back(it);
  }
  n = dat.size();
  for (i = 0; i < n - 1; i++) {
    dif.push_back(dat[i + 1] - dat[i]);
  }
  for (auto it : dif) {
    inf.push_back({it, 0});
  }
  sort(inf.begin(), inf.end());
  if (n != 1) {
    inf[0].second = inf[0].first;
  }
  for (i = 1; i < inf.size(); i++) {
    inf[i].second = inf[i - 1].second + inf[i].first;
  }
  for (i = 0; i < inf.size(); i++) {
    inf_.insert({inf[i].first, {inf[i].second, i + 1}});
  }
  cin >> q;
  for (i = 0; i < q; i++) {
    cin >> a >> b;
    sz = b - a;
    if (n == 1) {
      ress.push_back(sz + 1);
      continue;
    }
    if (sz == 0) {
      ress.push_back(n);
      continue;
    }
    auto iter = inf_.lower_bound({sz + 1, {0, 0}});
    if (iter == inf_.begin()) {
      ress.push_back(n * (sz + 1));
      continue;
    } else {
      iter--;
      s = iter->second.first;
      a = (sz + 1) * (iter->second.second) - s;
      res = n * (sz + 1) - a;
      ress.push_back(res);
    }
  }
  for (auto it : ress) {
    cout << it << " ";
  }
  return 0;
}
