#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long s[n];
  for (long long i = 0; i < n; i++) {
    cin >> s[i];
  }
  long long q;
  cin >> q;
  pair<long long, long long> p[q];
  for (long long i = 0; i < q; i++) {
    cin >> p[i].first >> p[i].second;
  }
  sort(s, s + n);
  long long d[n - 1];
  for (long long i = 0; i < n - 1; i++) {
    d[i] = s[i + 1] - s[i];
  }
  sort(d, d + n - 1);
  long long sd[n - 1];
  sd[0] = d[0];
  for (long long i = 1; i < n - 1; i++) {
    sd[i] = d[i] + sd[i - 1];
  }
  for (long long i = 0; i < q; i++) {
    long long l = 0, h = n - 2;
    long long mid = (l + h) / 2, ans = -1;
    long long x = (p[i].second - p[i].first + 1);
    while (l <= h) {
      mid = (l + h) / 2;
      if (d[mid] <= x) {
        ans = mid;
        l = mid + 1;
      } else {
        h = mid - 1;
      }
    }
    long long sol;
    if (ans == -1) {
      sol = n * x;
    } else {
      sol = sd[ans] + (n - ans - 1) * x;
    }
    cout << sol << " ";
  }
}
