#include <bits/stdc++.h>
using namespace std;
int n;
vector<long long int> a;
vector<long long int> sum;
vector<long long int> s;
long long int solve(long long int z) {
  vector<long long int>::iterator it;
  it = upper_bound(s.begin(), s.end(), z);
  int p = (it - s.begin());
  return sum[p] + (n - p) * z;
}
int main() {
  scanf("%d", &n);
  a.resize(n);
  sum.resize(n);
  for (int i = int(0); i <= int(n - 1); i++) cin >> a[i];
  sort(a.begin(), a.end());
  s.resize(n);
  for (int i = 0; i < a.size() - 1; i++) {
    s[i] = (a[i + 1] - a[i]);
  }
  s[n - 1] = 1000000000000000002;
  sort(s.begin(), s.end());
  int j = 0;
  sum[0] = 0;
  for (j = 0; j < n - 1; j++) {
    sum[j + 1] = s[j] + sum[j];
  }
  int q;
  scanf("%d", &q);
  long long int l, r;
  for (int i = int(0); i <= int(q - 1); i++) {
    cin >> l >> r;
    if (i) cout << " ";
    cout << solve(r - l + 1);
  }
  cout << endl;
  return 0;
}
