#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, q, l, r;
  cin >> n;
  vector<long long int> arr(n), dif(n - 1), cumdif(n - 1);
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  sort(arr.begin(), arr.end());
  if (n > 1)
    for (long long int i = 1; i < n; i++) dif[i - 1] = arr[i] - arr[i - 1];
  sort(dif.begin(), dif.end());
  if (n > 1) {
    cumdif[0] = dif[0];
    for (long long int i = 1; i < n - 1; i++)
      cumdif[i] = cumdif[i - 1] + dif[i];
  }
  cin >> q;
  while (q--) {
    cin >> l >> r;
    long long int num = (r - l + 1);
    long long int low = 0;
    long long int high = n - 2, mid, index = -1;
    if (n > 1) {
      while (low <= high) {
        mid = (low + high) / 2;
        if (dif[mid] < num) {
          index = mid;
          low = mid + 1;
        } else
          high = mid - 1;
      }
    }
    long long int ans = (n - (index + 1)) * num;
    if (index != -1) ans += cumdif[index];
    cout << ans << " ";
  }
  return 0;
}
