#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  set<long long> S;
  for (int i = 0; i < n; ++i) {
    static long long x;
    scanf("%lld", &x);
    S.insert(x);
  }
  vector<long long> v;
  for (long long x : S) v.push_back(x);
  vector<long long> Q;
  n = (int)v.size();
  for (int i = 1; i < n; ++i) Q.push_back(v[i] - v[i - 1] - 1);
  sort(Q.begin(), Q.end());
  vector<long long> pref(n);
  pref[n - 1] = 0;
  for (int i = n - 1; i > 0; --i) pref[i - 1] = pref[i] + Q[i - 1];
  long long sum = v[n - 1] - v[0] + 1;
  int q;
  scanf("%d", &q);
  while (q--) {
    static long long l, r;
    scanf("%lld%lld", &l, &r);
    r -= l;
    static int pos;
    pos = lower_bound(Q.begin(), Q.end(), r) - Q.begin();
    printf("%lld ", sum + r - (pref[pos] - (n - pos - 1) * r));
  }
}
