#include <bits/stdc++.h>
using namespace std;
const long long N = 100000;
long long a[300300], ans[300300], s[300300], d[300300], n, Q;
struct node {
  long long id, len, ans;
} q[300300];
bool operator<(const node &p, const node &q) { return p.len < q.len; }
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while ((ch < '0') || (ch > '9')) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ((ch >= '0') && (ch <= '9')) {
    x = x * 10 + (ch - '0');
    ch = getchar();
  }
  return x * f;
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) s[i] = read();
  Q = read();
  for (long long i = 1; i <= Q; i++) {
    long long l = read(), r = read();
    q[i].len = r - l + 1;
    q[i].id = i;
  }
  sort(q + 1, q + Q + 1);
  sort(s + 1, s + n + 1);
  for (long long i = 1; i <= n - 1; i++) d[i] = s[i + 1] - s[i];
  sort(d + 1, d + n);
  long long cur = 0, cnt = 0;
  for (long long i = 1; i <= Q; i++) {
    while ((cur < n - 1) && (q[i].len >= d[cur + 1])) cnt += d[++cur];
    q[i].ans = cnt + (n - cur) * q[i].len;
    ans[q[i].id] = q[i].ans;
  }
  for (long long i = 1; i <= Q; i++) printf("%lld ", ans[i]);
  return 0;
}
