#include <bits/stdc++.h>
using namespace std;
void Weapons19() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int32_t main() {
  Weapons19();
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  sort(v.begin(), v.end());
  vector<long long> gaps;
  for (long long i = 1; i < n; i++) gaps.push_back(v[i] - v[i - 1]);
  sort(gaps.begin(), gaps.end());
  long long q;
  cin >> q;
  vector<long long> k = gaps;
  for (long long i = (long long)k.size() - 2; i >= 0; i--) k[i] += k[i + 1];
  while (q--) {
    long long a, b;
    cin >> a >> b;
    long long ans = v[n - 1] + b - v[0] - a + 1;
    long long x =
        upper_bound(gaps.begin(), gaps.end(), b - a + 1) - gaps.begin();
    long long p;
    if (x == n - 1) {
      x = 0;
      p = 0;
    } else {
      p = k[x];
      x = n - 1 - x;
    }
    ans = ans - p + x * (b - a + 1);
    cout << ans << " ";
  }
}
