#include <bits/stdc++.h>
using namespace std;
const long long bigint = 2e18 + 5;
const long long maxn = 1e5 + 5;
long long tot, mid, l, r, w, xx, yy, now, n, q, a[maxn], b[maxn], c[maxn],
    pre[maxn];
bool find(long long k, long long step) {
  if (c[k] >= step)
    return true;
  else
    return false;
}
int main() {
  scanf("%I64d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", b + i);
  sort(b + 1, b + n + 1);
  now = 1;
  a[1] = b[1];
  for (int i = 2; i <= n; i++)
    if (a[now] != b[i]) {
      now++;
      a[now] = b[i];
    }
  n = now;
  for (int i = 1; i < n; i++) c[i] = a[i + 1] - a[i];
  c[n] = bigint;
  sort(c + 1, c + n + 1);
  for (int i = 1; i <= n; i++) pre[i] = pre[i - 1] + c[i];
  scanf("%I64d", &q);
  for (int L = 1; L <= q; L++) {
    scanf("%I64d%I64d", &xx, &yy);
    xx = yy - xx + 1;
    l = 1;
    r = n;
    w = 0;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (find(mid, xx)) {
        w = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
    tot = pre[w - 1] + xx * (n - w + 1);
    printf("%I64d ", tot);
  }
  printf("\n");
  return 0;
}
