#include <bits/stdc++.h>
using namespace std;
const int SZ = 1 << 19, N = 1e5 + 9;
char buf[SZ], *ie = buf + SZ, *ip = ie - 1;
inline long long in() {
  if (++ip == ie) fread(ip = buf, 1, SZ, stdin);
  while (*ip < '-')
    if (++ip == ie) fread(ip = buf, 1, SZ, stdin);
  long long x = *ip & 15;
  if (++ip == ie) fread(ip = buf, 1, SZ, stdin);
  while (*ip > '-') {
    x *= 10;
    x += *ip & 15;
    if (++ip == ie) fread(ip = buf, 1, SZ, stdin);
  }
  return x;
}
long long a[N], s[N];
int main() {
  register int n = in();
  for (register int i = 1; i <= n; ++i) a[i] = in();
  sort(a + 1, a + n + 1);
  for (register int i = 1; i <= n; ++i) a[i] = a[i + 1] - a[i];
  a[n] = 9e18;
  sort(a + 1, a + n + 1);
  for (register int i = 1; i <= n; ++i) s[i] = s[i - 1] + a[i];
  for (register int k = in(); k--;) {
    long long d = in();
    d = in() - d + 1;
    register int t = lower_bound(a + 1, a + n + 1, d) - a;
    cout << s[t - 1] + d * (n - t + 1) << ' ';
  }
  return 0;
}
