#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 20;
int n, m;
long long sum[N], v[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<long long> s(n);
  for (int i = 0; i < n; ++i) cin >> s[i];
  sort(s.begin(), s.end());
  s.erase(unique(s.begin(), s.end()), s.end());
  n = s.size();
  for (int i = 1; i < n; ++i) v[i] = s[i] - s[i - 1];
  sort(v + 1, v + n + 1);
  for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + v[i];
  cin >> m;
  while (m--) {
    long long x, y, res = 0;
    cin >> x >> y;
    int pos = upper_bound(v + 1, v + n + 1, y - x + 1) - v;
    res += sum[pos - 1];
    res += (n - pos + 1) * (y - x + 1);
    res += y - x + 1;
    cout << res << " ";
  }
  return 0;
}
