#include <bits/stdc++.h>
using namespace std;
long long n, q;
const int MAXN = 100005;
long long s[MAXN], pre[MAXN], gaps[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  sort(s, s + n);
  for (int i = 1; i < n; i++) gaps[i] = s[i] - s[i - 1];
  sort(gaps, gaps + n);
  for (int i = 1; i < n; i++) pre[i] = pre[i - 1] + gaps[i];
  cin >> q;
  for (int i = 0; i < q; i++) {
    long long l, r;
    cin >> l >> r;
    long long g = r - l + 1;
    long long p = lower_bound(gaps + 1, gaps + n, g) - gaps;
    cout << pre[p - 1] + (n - p + 1) * g << " ";
  }
  cout << "\n";
  return 0;
}
