#include <bits/stdc++.h>
using namespace std;
long long n, q, s[100005], t[100005];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  sort(s, s + n);
  for (int i = 0; i < n - 1; i++) s[i] = s[i + 1] - s[i];
  sort(s, s + n - 1);
  for (int i = n - 1; i >= 1; i--) s[i] = s[i - 1];
  s[0] = 0;
  sort(s, s + n);
  for (int i = 1; i < n; i++) t[i] = t[i - 1] + (s[i] - s[i - 1]) * (n + 1 - i);
  cin >> q;
  for (int i = 0; i < q; i++) {
    long long l, r;
    cin >> l >> r;
    long long dist = r - l + 1;
    int ind = lower_bound(s, s + n, dist) - &s[0] - 1;
    cout << t[ind] + (dist - s[ind]) * (n - ind) << " ";
  }
}
