#include <bits/stdc++.h>
using namespace std;
map<long long, long long> m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (!m[a[i]]) v.push_back(a[i]);
    m[a[i]]++;
  }
  sort(v.begin(), v.end());
  vector<long long> p;
  for (long long i = 1; i < (long long)v.size(); i++) {
    p.push_back(v[i] - v[i - 1]);
  }
  sort(p.begin(), p.end());
  long long pre[(long long)p.size() + 1];
  pre[0] = 0;
  for (long long i = 1; i <= (long long)p.size(); i++)
    pre[i] = pre[i - 1] + p[i - 1];
  long long sz = v.size();
  long long q;
  cin >> q;
  while (q--) {
    long long l, r;
    cin >> l >> r;
    long long diff = r - l + 1;
    int pos = upper_bound(p.begin(), p.end(), diff) - p.begin();
    long long ans = diff * (sz) - (diff * pos - pre[pos]);
    cout << ans << " ";
  }
}
