#include <bits/stdc++.h>
using namespace std;
int n;
long long s[100009], f[100009], sum[100009];
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  sort(s, s + n);
  for (int i = 1; i < n; i++) f[i - 1] = (s[i] - s[i - 1]);
  sort(f, f + n - 1);
  sum[0] = f[0];
  for (int i = 1; i < n - 1; i++) sum[i] = sum[i - 1] + f[i];
  int q;
  cin >> q;
  while (q--) {
    long long l, r, d;
    cin >> l >> r;
    d = r - l + 1;
    if (n == 1) {
      cout << d << " ";
      continue;
    }
    int id = lower_bound(f, f + n - 1, d) - f;
    long long ans = (n - 1 - id + 1LL) * d;
    if (id - 1 >= 0) ans += sum[id - 1];
    cout << ans << " ";
  }
}
