#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int maxn = 100000 + 10;
const double eps = 1e-9;
long long a[maxn], b[maxn], ans[maxn];
pair<long long, int> q[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  n = unique(a, a + n) - a;
  b[n - 1] = INF;
  for (int i = n - 2; i >= 0; i--) {
    b[i] = a[i + 1] - a[i];
  }
  sort(b, b + n);
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    long long L, R;
    cin >> L >> R;
    q[i] = pair<long long, int>(R - L + 1, i);
  }
  sort(q, q + m);
  int k = 0;
  long long sum = 0;
  for (int i = 0; i < m; i++) {
    while (k < n && b[k] < q[i].first) {
      sum += b[k++];
    }
    ans[q[i].second] = 1ll * (n - k) * q[i].first + sum;
  }
  for (int i = 0; i < m; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
