#include <bits/stdc++.h>
using namespace std;
inline void start() {
  ios_base::sync_with_stdio(false);
  cout.tie(nullptr);
  cin.tie(nullptr);
}
inline void solve() {
  int64_t n;
  cin >> n;
  vector<int64_t> a(n);
  for (int64_t i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  a.resize(unique(a.begin(), a.end()) - a.begin());
  vector<int64_t> c;
  for (int64_t i = 1; i < a.size(); ++i) {
    c.emplace_back(a[i] - a[i - 1]);
  }
  c.emplace_back(0);
  sort(c.begin(), c.end());
  a.swap(c);
  int64_t m;
  cin >> m;
  vector<int64_t> b(a.size() - 1);
  for (int64_t i = 0; i < b.size(); ++i) {
    b[i] = (a.size() - i) * (a[i + 1] - a[i]);
  }
  for (int64_t i = 1; i < b.size(); ++i) {
    b[i] += b[i - 1];
  }
  for (int64_t i = 0; i < m; ++i) {
    int64_t left, right;
    cin >> left >> right;
    int64_t x = right - left + 1;
    left = -1;
    right = a.size();
    while (right - left > 1) {
      int64_t mid = (left + right) / 2;
      if (a[mid] <= x) {
        left = mid;
      } else {
        right = mid;
      }
    }
    if (left == 0) {
      cout << x * a.size() << " ";
    } else {
      cout << b[left - 1] + (x - a[left]) * (a.size() - left) << " ";
    }
  }
}
int32_t main() {
  start();
  solve();
  return 0;
}
