#include <bits/stdc++.h>
using namespace std;
struct S {
  int a, b;
  S() {}
  S(int _a, int _b) {
    a = _a;
    b = _b;
  }
  const bool operator<(const S &o) const { return a < o.a; }
};
priority_queue<int, vector<int>, greater<int>> mpq;
inline void showAll(vector<int> &v, int NL_or_space) {
  for (int &here : v) {
    printf("%d", here);
    printf("%c", (NL_or_space) ? '\n' : ' ');
  }
}
const int SIZE = 100009;
vector<long long> v, gap;
long long psum[SIZE];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long inp;
    scanf("%lld", &inp);
    v.push_back(inp);
  }
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  for (int i = 0; i < v.size() - 1; i++) gap.push_back(v[i + 1] - v[i]);
  sort(gap.begin(), gap.end());
  for (int i = 1; i <= gap.size(); i++) psum[i] = psum[i - 1] + gap[i - 1];
  int q;
  scanf("%d", &q);
  while (q--) {
    long long l, r;
    scanf("%lld %lld", &l, &r);
    long long L = r - l + 1;
    int left = -1, right = gap.size();
    while (left + 1 < right) {
      int mid = (left + right) / 2;
      if (gap[mid] > L) {
        right = mid;
      } else
        left = mid;
    }
    left++;
    long long ans = L * (long long)v.size();
    ans = ans - ((L * (long long)left) - psum[left]);
    printf("%lld\n", ans);
  }
  return 0;
}
