#include <bits/stdc++.h>
using namespace std;
istream& in = cin;
int n, q;
long long a[100010];
pair<long long, long long> Q[100010];
unsigned long long ans[100010];
void input() {
  in >> n;
  for (int i = 1; i <= n; ++i) in >> a[i];
  in >> q;
  for (int i = 1; i <= q; ++i) {
    long long l, r;
    in >> l >> r;
    Q[i] = make_pair(r - l + 1, i);
  }
}
int main() {
  int TEST_CASE = 1;
  while (TEST_CASE-- > 0) {
    input();
    sort(Q + 1, Q + q + 1);
    set<long long> S;
    for (int i = 1; i <= n; ++i) {
      S.insert(a[i]);
    }
    int KKK = 1;
    for (long long s : S) {
      a[KKK++] = s;
    }
    n = KKK - 1;
    map<long long, int> M;
    for (int i = 1; i < n; ++i) {
      M[a[i + 1] - a[i]]++;
    }
    long long num = S.size();
    long long val = 0;
    long long last = 0;
    auto ptr = M.begin();
    for (int KK = 1; KK <= q; ++KK) {
      long long len = Q[KK].first;
      while (ptr != M.end() && ptr->first < len) {
        long long ppp = (ptr->first - last) * num;
        num -= ptr->second;
        last = ptr->first;
        val += ppp;
        ptr++;
      }
      val += num * (len - last);
      ans[Q[KK].second] = val;
      last = len;
    }
    for (int i = 1; i <= q; ++i) {
      cout << ans[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
