#include <bits/stdc++.h>
using namespace std;
int n, q;
long long s[100005], l, r, tot, ans[100005];
pair<long long, int> p[100005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", s + i);
  sort(s + 1, s + n + 1);
  for (int i = 1; i < n; i++) s[i] = s[i + 1] - s[i];
  sort(s + 1, s + n);
  scanf("%d", &q);
  for (int i = 1; i <= q; i++)
    scanf("%lld%lld", &l, &r), p[i] = make_pair(r - l + 1, i);
  sort(p + 1, p + q + 1);
  for (int pt = 1, i = 1; i <= q; i++) {
    while (pt < n && s[pt] <= p[i].first) tot = tot + s[pt++];
    ans[p[i].second] = tot + p[i].first * (n - pt + 1);
  }
  for (int i = 1; i <= q; i++) printf("%lld ", ans[i]);
}
