#include <bits/stdc++.h>
using namespace std;
constexpr long long INF = 1e18;
constexpr long long MOD = 1e9 + 7;
constexpr double PI = 3.14159265358979323846;
constexpr int di[] = {0, 0, 1, -1};
constexpr int dj[] = {1, -1, 0, 0};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, q;
  long long s[112345], l[112345], r[112345];
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> s[i];
  sort(s, s + n);
  cin >> q;
  for (int i = (0); i < (q); i++) cin >> l[i] >> r[i];
  vector<long long> v;
  for (int i = (0); i < (n - 1); i++) v.push_back(s[i + 1] - s[i]);
  sort((v).begin(), (v).end());
  vector<long long> sum;
  sum.push_back(0);
  for (int i = (0); i < (n - 1); i++) sum.push_back(sum[sum.size() - 1] + v[i]);
  for (int i = (0); i < (q); i++) {
    long long rng = r[i] - l[i] + 1;
    long long res = rng;
    int la = v.size();
    int lo = -1;
    while (la - lo > 1) {
      int mid = (la + lo) / 2;
      if (v[mid] > rng)
        la = mid;
      else
        lo = mid;
    }
    res += rng * (v.size() - la);
    res += sum[lo + 1];
    cout << res << " ";
  }
  cout << endl;
  return 0;
}
