#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 7;
long long a[M];
long long s[M];
long long c[M];
long long n, m;
int main() {
  scanf("%I64d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &a[i]);
  }
  sort(a, a + n);
  for (int i = 1; i < n; i++) {
    s[i] = a[i] - a[i - 1];
  }
  sort(s + 1, s + n);
  for (int i = 1; i < n; i++) {
    c[i] = c[i - 1] + s[i];
  }
  scanf("%I64d", &m);
  long long x, y;
  long long l = 0;
  for (int i = 0; i < m; i++) {
    scanf("%I64d%I64d", &x, &y);
    long long t = y - x + 1;
    long long f = lower_bound(s, s + n, t) - s;
    printf("%I64d\n", c[f - 1] + (n - f + 1) * t);
    l = 0;
  }
}
