#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
const int N = 100010;
int n, q;
long long s[N], d[N];
int upd(long long x) {
  int l = 1, r = n - 1;
  int mid, ans = 0;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (d[mid] > x)
      r = mid - 1;
    else
      l = mid + 1, ans = mid;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> s[i];
  sort(s + 1, s + 1 + n);
  for (int i = 1; i <= n - 1; i++) d[i] = s[i + 1] - s[i];
  sort(d + 1, d + n);
  for (int i = 1; i <= n - 1; i++) s[i] = s[i - 1] + d[i];
  long long l, r;
  cin >> q;
  while (q--) {
    cin >> l >> r;
    int mid = upd(r - l + 1);
    cout << s[mid] + (long long)(n - mid) * (r - l + 1) << ' ';
  }
  return 0;
}
