#include <bits/stdc++.h>
using namespace std;
const int len = 5e5 + 10;
const int maxn = len;
const double pi = acos(-1.0);
const long long mod = 998244353;
const int inf = 0x3f3f3f3f;
long long a[len], b[len], c[len];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  sort(a + 1, a + 1 + n);
  for (int i = 1; i < n; ++i) b[i] = a[i + 1] - a[i];
  sort(b + 1, b + n);
  for (int i = 1; i <= n; ++i) c[i] = c[i - 1] + b[i];
  int q;
  cin >> q;
  while (q--) {
    long long l, r, le;
    cin >> l >> r;
    le = r - l + 1;
    long long ans = 0;
    int p = upper_bound(b + 1, b + n, le) - b - 1;
    ans += c[p] + le;
    ans += (n - p - 1) * le;
    cout << ans << endl;
  }
}
