#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, q;
long long a[maxn];
long long b[maxn];
long long c[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + n + 1);
  n = unique(a + 1, a + n + 1) - (a + 1);
  for (int i = 2; i <= n; i++)
    b[i - 1] = a[i] - a[i - 1] - 1, b[i - 1] = -b[i - 1];
  n--;
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; i++) c[i] = b[i] + c[i - 1];
  scanf("%d", &q);
  for (int i = 1; i <= q; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    x = y - x;
    y = lower_bound(b + 1, b + n + 1, -x) - (b + 1);
    long long ans = a[n + 1] + x - a[1] + 1 - (-c[y] - x * y);
    cout << ans << " ";
  }
  cout << endl;
}
