#include <bits/stdc++.h>
using namespace std;
long long n, a, q, l, k, sum[100005];
set<long long> s;
vector<long long> v, arr, has;
int main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a;
    s.insert(a);
  }
  set<long long>::iterator it;
  for (it = s.begin(); it != s.end(); it++) v.push_back(*it);
  for (long long i = 0; i < v.size() - 1; i++) arr.push_back(v[i + 1] - v[i]);
  sort(arr.begin(), arr.end());
  for (int i = 0; i < arr.size(); i++) sum[i + 1] = sum[i] + arr[i];
  cin >> q;
  for (int i = 1; i <= q; i++) {
    cin >> l >> k;
    long long t = k - l + 1;
    long long idx = lower_bound(arr.begin(), arr.end(), t) - arr.begin();
    has.push_back(t + sum[idx] + t * (arr.size() - idx));
  }
  for (int i = 0; i < has.size(); i++) cout << has[i] << " ";
  cout << endl;
}
