#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 6;
const int INF = 0x3f3f3f3f;
long long a[maxn];
long long cha[maxn], chasum[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  sort(a, a + n);
  int cnt = 0;
  long long last = a[0];
  for (int i = 1; i < n; i++) {
    if (a[i] != last) {
      cha[cnt++] = a[i] - last;
      last = a[i];
    }
  }
  sort(cha, cha + cnt);
  for (int i = 0; i < cnt; i++) {
    if (i == 0)
      chasum[i] = cha[i];
    else
      chasum[i] = chasum[i - 1] + cha[i];
  }
  int T;
  scanf("%d", &T);
  while (T--) {
    long long l, r;
    scanf("%lld%lld", &l, &r);
    long long dis = r - l + 1;
    int pos = (int)(upper_bound(cha, cha + cnt, dis) - cha);
    if (pos == 0)
      printf("%lld ", dis * (cnt + 1));
    else
      printf("%lld ", chasum[pos - 1] + (cnt - pos + 1) * dis);
  }
  return 0;
}
