#include <bits/stdc++.h>
#pragma GCC optimize("03")
using namespace std;
int n, q;
long long a[100100], dp[100100], sum[100100], l, r;
long long solve(long long p) {
  long long ans = p;
  long long st = 1, dr = n - 1, mid;
  while (st <= dr) {
    mid = (st + dr) / 2LL;
    if (dp[mid] <= p)
      st = mid + 1;
    else
      dr = mid - 1;
  }
  ans += sum[dr] + ((long long)n - 1LL - dr) * p;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 2; i <= n; i++) dp[i - 1] = a[i] - a[i - 1];
  sort(dp + 1, dp + n);
  for (int i = 1; i < n; i++) sum[i] = sum[i - 1] + dp[i];
  cin >> q;
  while (q--) {
    cin >> l >> r;
    l++;
    r++;
    if (n == 1) {
      cout << r - l + 1LL << ' ';
      continue;
    }
    cout << solve(r - l + 1LL) << ' ';
  }
  return 0;
}
