#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0, ThxDem = n; i < ThxDem; ++i) cin >> a[i];
  sort(a, a + n);
  long long q;
  cin >> q;
  pair<long long, long long> r[q];
  long long b, c;
  for (int i = 0, ThxDem = q; i < ThxDem; ++i) {
    cin >> b >> c;
    r[i].first = c - b + 1;
    r[i].second = i;
  }
  sort(r, r + q);
  long long d[n - 1];
  for (int i = 0, ThxDem = n - 1; i < ThxDem; ++i) {
    d[i] = a[i + 1] - a[i];
  }
  sort(d, d + n - 1);
  long long va = 0;
  long long par[n];
  par[0] = 0;
  for (int i = 1, ThxDem = n; i < ThxDem; ++i) {
    par[i] = par[i - 1] + d[i - 1];
  }
  for (int i = 0, ThxDem = q; i < ThxDem; ++i) {
    while (r[i].first > d[va] && va < n - 1) va++;
    r[i].first = r[i].first * (n - va) + par[va];
  }
  for (int i = 0, ThxDem = q; i < ThxDem; ++i) {
    swap(r[i].first, r[i].second);
  }
  sort(r, r + q);
  for (int i = 0, ThxDem = q; i < ThxDem; ++i) {
    cout << r[i].second << " ";
  }
  return 0;
}
