#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using ll = long long int;
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug &operator<<(const c &) {
    return *this;
  }
};
template <typename T>
void ara_read(T &v, ll n) {
  ll temp;
  for (ll i = 0; i < n; i++) {
    scanf("%lld", &temp);
    v.emplace_back(temp);
  }
}
template <typename T>
void ara_print(T &v) {
  for (ll x : v) printf("%lld ", x);
  puts("");
}
const int INF = 1e9 + 99;
using Pair = pair<int, int>;
using vec = vector<ll>;
void bruteforce(int l, int r, vec &v) {
  return;
  set<ll> myset;
  for (ll x : v) {
    for (ll i = l; i <= r; i++) myset.insert(i + x);
  }
  printf("BruteForce : %d\n", (int)myset.size());
}
void improved(vec &v, vec &pref, int n) {
  ll l, r;
  scanf("%lld%lld", &l, &r);
  ll w = r - l + 1;
  ll ind = lower_bound(v.begin(), --v.end(), w) - v.begin();
  ll ans = (n - ind) * w + pref[ind];
  printf("%lld ", ans);
}
int main() {
  int n;
  scanf("%d", &n);
  vec v(n);
  for (ll &x : v) scanf("%lld", &x);
  sort(v.begin(), v.end());
  for (int i = 0; i < n - 1; i++) v[i] = v[i + 1] - v[i];
  sort(v.begin(), --v.end());
  int q;
  scanf("%d", &q);
  vec pref(n);
  for (int i = 1; i < n; i++) pref[i] = pref[i - 1] + v[i - 1];
  for (int i = 0; i < q; i++) improved(v, pref, n);
  puts("");
  return 0;
}
