#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long n, q;
  vector<long long> str;
  vector<pair<long long, long long> > zapr;
  cin >> n;
  str.resize(n);
  for (int i = 0; i < n; i++) cin >> str[i];
  cin >> q;
  zapr.resize(q);
  for (int i = 0; i < q; i++) cin >> zapr[i].first >> zapr[i].second;
  map<long long, long long> mp;
  vector<long long> nw;
  sort(str.begin(), str.end());
  for (int i = 1; i < str.size(); i++)
    if (str[i - 1] == str[i]) {
      str.erase(str.begin() + i);
      i--;
      n--;
    }
  nw.push_back(-1);
  for (int i = 0; i < n - 1; i++) {
    if (str[i + 1] - str[i] - 1 > 0) {
      if (mp[str[i + 1] - str[i] - 1] == 0)
        nw.push_back(str[i + 1] - str[i] - 1);
      mp[str[i + 1] - str[i] - 1]++;
    }
  }
  sort(nw.begin(), nw.end());
  vector<pair<long long, long long> > ans;
  ans.resize(nw.size());
  for (int i = 0; i < nw.size(); i++) {
    ans[i].first = nw[i];
    ans[i].second = mp[nw[i]];
  }
  vector<long long> sum, sum2;
  sum.resize(ans.size());
  sum2.resize(ans.size());
  sum[0] = ans[0].second;
  sum2[0] = ans[0].second;
  for (int i = 1; i < ans.size(); i++) {
    sum[i] = sum[i - 1] + ans[i].second * ans[i].first;
    sum2[i] = sum2[i - 1] + ans[i].second;
  }
  for (int i = 0; i < q; i++) {
    long long now = zapr[i].second - zapr[i].first + 1;
    long long l = 0, r = ans.size();
    while (r - l > 1) {
      long long m = (r + l) / 2;
      if (ans[m].first < now)
        l = m;
      else
        r = m;
    }
    cout << n + sum[l] + (sum2[sum2.size() - 1] - sum2[l]) * (now - 1) + now - 1
         << " ";
  }
  return 0;
}
