#include <bits/stdc++.h>
using namespace std;
inline void in(int &n) {
  n = 0;
  int ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  }
  n = n * sign;
}
inline void inL(long long int &n) {
  n = 0;
  int ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  }
  n = n * sign;
}
int main() {
  int n;
  in(n);
  set<long long int> S;
  for (int i = 0; i < n; i++) {
    long long int x;
    inL(x);
    S.insert(x);
  }
  int disElem = (int)S.size();
  vector<long long int> v;
  for (set<long long int>::iterator it = S.begin(); it != S.end(); it++)
    v.push_back(*it);
  vector<long long int> diff;
  for (int i = 1; i < v.size(); i++) {
    long long int x = v[i] - v[i - 1] - 1;
    if (x) diff.push_back(x);
  }
  diff.push_back(1e18);
  sort(diff.begin(), diff.end());
  long long int sum[(int)diff.size()];
  long long int prev = 0;
  for (int i = 0; i < diff.size(); i++) {
    sum[i] = prev + diff[i];
    prev = sum[i];
  }
  int q;
  in(q);
  vector<long long int> res;
  while (q--) {
    long long int l, r;
    inL(l);
    inL(r);
    if (l == r) {
      res.push_back(disElem);
    } else {
      int pos = upper_bound(diff.begin(), diff.end(), r - l) - diff.begin();
      long long int ans = 0;
      if (pos) ans += sum[pos - 1];
      long long int x = (int)diff.size() - pos;
      long long int y = r - l;
      ans += x * y;
      res.push_back(ans + disElem);
    }
  }
  for (int i = 0; i < res.size(); i++) printf("%I64d ", res[i]);
  printf("\n");
}
