#include <bits/stdc++.h>
using namespace std;
long long num[100005], sum[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &num[i]);
  num[0] = -1e18 - 1;
  sort(num + 1, num + n + 1);
  for (int i = n; i > 0; i--) num[i] -= num[i - 1];
  sort(num + 1, num + n + 1);
  for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + num[i];
  int m;
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    long long l, r;
    scanf("%lld%lld", &l, &r);
    l = r - l + 1;
    int p = lower_bound(num + 1, num + n + 1, l) - num;
    printf("%lld ", sum[p - 1] + (n - p + 1) * l);
  }
  printf("\n");
  return 0;
}
