#include <bits/stdc++.h>
using namespace std;
int n, i;
long long v[100100];
long long d[100100];
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> v[i];
  sort(v + 1, v + n + 1);
  for (i = 1; i < n; ++i) v[i] = v[i + 1] - v[i];
  --n;
  sort(v + 1, v + n + 1);
  for (i = 1; i <= n; ++i) d[i] = d[i - 1] + v[i];
  int q;
  cin >> q;
  while (q--) {
    long long x, y;
    cin >> x >> y;
    x = y - x + 1;
    int pos = lower_bound(v + 1, v + n + 1, x + 1) - v;
    long long ans = d[pos - 1];
    ans += x + (n - pos + 1) * x;
    cout << ans << ' ';
  }
}
