#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int arr[n + 5];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  reverse(arr, arr + n);
  vector<long long int> v;
  for (int i = 0; i < n - 1; i++) {
    long long int diff = arr[i] - arr[i + 1];
    v.push_back(diff);
  }
  sort(v.begin(), v.end());
  long long int dp[n + 5];
  dp[0] = 0;
  for (int i = 1; i <= v.size(); i++) {
    dp[i] = v[i - 1] + dp[i - 1];
  }
  int q;
  cin >> q;
  while (q--) {
    long long int a, b;
    cin >> a >> b;
    long long int ans = b - a + 1;
    long long int copy = ans;
    if (upper_bound(v.begin(), v.end(), ans) != v.end()) {
      int index = upper_bound(v.begin(), v.end(), ans) - v.begin();
      ans = ans + dp[index] + (v.size() - index) * copy;
    } else {
      ans = ans + dp[v.size()];
    }
    cout << ans << " ";
  }
}
