#include <bits/stdc++.h>
using namespace std;
long long int search1(vector<long long int> v, long long int l) {
  if (v[v.size() - 1] <= l) return v.size();
  if (l < v[0]) return 0;
  for (int i = 0; i < v.size() - 1; ++i) {
    if (l >= v[i] && l < v[i + 1]) return i + 1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int a[n];
  set<long long int> s;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    s.insert(a[i]);
  }
  vector<long long int> v;
  for (auto i = s.begin(); i != s.end(); ++i) v.push_back(*i);
  if (s.size() == 1) {
    long long int q;
    cin >> q;
    for (int i = 0; i < q; ++i) {
      long long int l, r;
      cin >> l >> r;
      long long int temp = r - l + 1;
      cout << temp << " ";
    }
    return 0;
  }
  sort(v.begin(), v.end());
  vector<long long int> v1;
  for (int i = 1; i < v.size(); ++i) {
    v1.push_back(v[i] - v[i - 1]);
  }
  sort(v1.begin(), v1.end());
  long long int dp[v1.size() + 1];
  memset(dp, 0, sizeof(dp));
  for (int i = 1; i <= v1.size(); ++i) {
    dp[i] = dp[i - 1] + v1[i - 1];
  }
  long long int q1;
  cin >> q1;
  for (int i = 0; i < q1; ++i) {
    long long int l, r;
    cin >> l >> r;
    long long int ans = 0, ans1 = 0;
    long long int len = r - l + 1;
    long long int temp1 =
        lower_bound(v1.begin(), v1.end(), r - l + 1) - v1.begin();
    ans = ans + dp[temp1] + (v1.size() - temp1) * (len) + len;
    cout << ans << " ";
  }
  return 0;
}
