#include <bits/stdc++.h>
using namespace std;
long long int f(long long int x, long long int y) {
  long long int res = 1;
  x = x % 998244353;
  while (y > 0) {
    if (y & 1) res = (res * x) % 998244353;
    y = y >> 1;
    x = (x * x) % 998244353;
  }
  return res;
}
int main() {
  long long int i, j, k, l, m, n, p, q, r, t, x = 1, y, mid;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  vector<long long int> v;
  for (i = 1; i < n; i++) v.push_back(a[i] - a[i - 1]);
  v.push_back(1000000000000000001);
  sort(v.begin(), v.end());
  long long int sum[n];
  for (i = 0; i < n; i++) {
    if (i == 0)
      sum[i] = v[i];
    else
      sum[i] = v[i] + sum[i - 1];
  }
  cin >> q;
  for (i = 0; i < q; i++) {
    cin >> l >> r;
    p = (r - l + 1);
    l = 0;
    r = n - 1;
    while (l <= r) {
      mid = (l + r) / 2;
      if (v[mid] <= p)
        l = mid + 1;
      else
        r = mid - 1;
    }
    if (r == -1)
      cout << (n - r - 1) * p << " ";
    else
      cout << sum[r] + (n - r - 1) * p << " ";
  }
  return 0;
}
