#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long pre[100005];
int main() {
  int t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long s[n + 3];
    for (long long i = 1; i <= n; i++) cin >> s[i];
    sort(s + 1, s + 1 + n);
    s[n + 1] = 2e18 + 1;
    long long dif[n + 5];
    for (long long i = 0; i < n + 5; i++) dif[i] = 2e18;
    for (long long i = 1; i <= n; i++) {
      dif[i] = s[i + 1] - s[i];
    }
    sort(dif + 1, dif + n + 1);
    for (long long i = 1; i <= n; i++) {
      pre[i] = pre[i - 1] + dif[i];
    }
    long long q;
    cin >> q;
    while (q--) {
      long long l, r;
      cin >> l >> r;
      long long lo = 1, hi = n;
      while (lo <= hi) {
        long long mid = (lo + hi) / 2;
        if (dif[mid] > (r - l + 1)) {
          hi = mid - 1;
        } else
          lo = mid + 1;
      }
      long long ans;
      ans = (n - hi) * (r - l + 1) + pre[hi];
      cout << ans << '\n';
    }
  }
}
