Problem: While some people enjoy spending their time solving programming contests, Dina prefers taking beautiful pictures. As soon as Byteland Botanical Garden announced Summer Oenothera Exhibition she decided to test her new camera there.

The exhibition consists of l = 10^{100} Oenothera species arranged in a row and consecutively numbered with integers from 0 to l - 1. Camera lens allows to take a photo of w species on it, i.e. Dina can take a photo containing flowers with indices from x to x + w - 1 for some integer x between 0 and l - w. We will denote such photo with [x, x + w - 1].

She has taken n photos, the i-th of which (in chronological order) is [x_i, x_i + w - 1] in our notation. She decided to build a time-lapse video from these photos once she discovered that Oenothera blossoms open in the evening. 

Dina takes each photo and truncates it, leaving its segment containing exactly k flowers, then she composes a video of these photos keeping their original order and voilà, a beautiful artwork has been created!

A scene is a contiguous sequence of photos such that the set of flowers on them is the same. The change between two scenes is called a cut. For example, consider the first photo contains flowers [1, 5], the second photo contains flowers [3, 7] and the third photo contains flowers [8, 12]. If k = 3, then Dina can truncate the first and the second photo into [3, 5], and the third photo into [9, 11]. First two photos form a scene, third photo also forms a scene and the transition between these two scenes which happens between the second and the third photos is a cut. If k = 4, then each of the transitions between photos has to be a cut.

Dina wants the number of cuts to be as small as possible. Please help her! Calculate the minimum possible number of cuts for different values of k.

Input

The first line contains three positive integer n, w, q (1 ≤ n, q ≤ 100 000, 1 ≤ w ≤ 10^9) — the number of taken photos, the number of flowers on a single photo and the number of queries.

Next line contains n non-negative integers x_i (0 ≤ x_i ≤ 10^9) — the indices of the leftmost flowers on each of the photos.

Next line contains q positive integers k_i (1 ≤ k_i ≤ w) — the values of k for which you have to solve the problem.

It's guaranteed that all k_i are distinct.

Output

Print q integers — for each width of the truncated photo k_i, the minimum number of cuts that is possible.

Examples

Input

3 6 5
2 4 0
1 2 3 4 5


Output

0
0
1
1
2


Input

6 4 3
1 2 3 4 3 2
1 2 3


Output

0
1
2

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int Max_N(100050);
const int Max_S(320);
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
template <class I>
inline void gi(I &x) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-') f = -1;
  for (x = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = x * 10 + (c & 15);
  x *= f;
}
template <class I>
inline void print(I x) {
  if (!x) putc('0');
  if (x < 0) putc('-'), x = -x;
  while (x) qu[++qr] = x % 10 + '0', x /= 10;
  while (qr) putc(qu[qr--]);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io::gi;
using io::print;
using io::putc;
struct Splay {
  int p, size;
  Splay *ch[2], *fa;
};
Splay *null, *ver[Max_N];
inline void pushup(Splay *&o) { o->size = o->ch[0]->size + 1 + o->ch[1]->size; }
inline void rotate(Splay *&o, int d) {
  Splay *k = o->ch[d ^ 1];
  o->ch[d ^ 1] = k->ch[d], k->ch[d] = o;
  k->fa = o->fa, o->fa = k, o->ch[d ^ 1]->fa = o;
  pushup(o), pushup(k), o = k;
}
Splay *Anc[Max_N];
void splay(Splay *&o, int k) {
  int d = (k ? Anc[k - 1] == o->ch[1] : -1);
  if (d != -1) {
    Splay *p = o->ch[d];
    int d2 = (--k ? Anc[k - 1] == p->ch[1] : -1);
    if (d2 != -1) {
      splay(p->ch[d2], --k);
      if (d == d2)
        rotate(o, d ^ 1);
      else
        rotate(o->ch[d], d);
    }
    rotate(o, d ^ 1);
  }
}
inline bool isroot(Splay *&u) { return u->fa->ch[0] != u && u->fa->ch[1] != u; }
void splay(Splay *&u) {
  int cnt(0);
  for (; !isroot(u); u = u->fa) Anc[cnt++] = u;
  splay(u, cnt);
}
void access(Splay *u) {
  for (Splay *v = null; u != null; v = u, u = u->fa)
    splay(u), u->ch[1] = v, pushup(u);
}
int query_Min(Splay *u) {
  while (u->ch[0] != null) u = u->ch[0];
  return u->p;
}
struct node {
  node(int _l, int _r, int _v) : l(_l), r(_r), v(_v) {}
  int l, r, v;
  inline bool operator<(const node &b) const {
    return v != b.v ? v < b.v : l < b.l;
  }
};
int N, W, Q, S, X[Max_N], K[Max_N], P[Max_N], Ans[Max_N], Max[20][Max_N],
    Min[20][Max_N], Log[Max_N];
set<node> R;
inline bool comp_P(int a, int b) { return K[a] < K[b]; }
inline int query(int l, int r) {
  int k = Log[r - l + 1];
  return max(Max[k][l], Max[k][r - (1 << k) + 1]) -
         min(Min[k][l], Min[k][r - (1 << k) + 1]);
}
int main() {
  null = new Splay(), null->p = 0, null->size = 0,
  null->ch[0] = null->ch[1] = null->fa = null;
  gi(N), gi(W), gi(Q), S = 100;
  for (int i = 2; i <= N; ++i) Log[i] = Log[i >> 1] + 1;
  for (int i = 1; i <= N; ++i) gi(X[i]), Max[0][i] = Min[0][i] = X[i];
  for (int i = 1; i <= N + 1; ++i)
    ver[i] = new Splay(), ver[i]->p = i,
    ver[i]->ch[0] = ver[i]->ch[1] = ver[i]->fa = null, pushup(ver[i]);
  for (int j = 1; (1 << j) <= N; ++j)
    for (int i = 1; i + (1 << j) - 1 <= N; ++i) {
      Max[j][i] = max(Max[j - 1][i], Max[j - 1][i + (1 << (j - 1))]);
      Min[j][i] = min(Min[j - 1][i], Min[j - 1][i + (1 << (j - 1))]);
    }
  for (int i = 1; i <= Q; ++i) gi(K[i]), K[i] = W - K[i], P[i] = i;
  sort(P + 1, P + 1 + Q, comp_P);
  for (int i = 1, j; i <= N; ++i) {
    for (j = i; j + 1 <= N && j <= i + S - 1 && X[i] == X[j + 1]; ++j)
      ;
    if (i - j + 1 <= S) {
      ver[i]->fa = ver[j + 1];
      if (j + 1 <= N) R.insert(node(i, j + 1, query(i, j + 1)));
    }
  }
  for (int i = 1, p, l, r; i <= Q; ++i) {
    p = P[i];
    while (R.empty() == false && R.begin()->v <= K[p]) {
      R.erase(node(l = R.begin()->l, r = R.begin()->r, R.begin()->v));
      access(ver[l]), splay(ver[l]), ver[l]->ch[0]->fa = null,
                                     ver[l]->ch[0] = null;
      if (r - l + 1 <= S) {
        ver[l]->fa = ver[r + 1];
        if (r + 1 <= N) R.insert(node(l, r + 1, query(l, r + 1)));
      } else
        ver[l]->fa = null;
      pushup(ver[l]);
    }
    for (int s = 1, l, r, mid; s <= N;) {
      access(ver[s]), splay(ver[s]), Ans[p] += ver[s]->ch[0]->size,
          s = query_Min(ver[s]);
      if (s > N) break;
      l = s, r = N + 1;
      while (l < r) {
        mid = l + ((r - l) >> 1);
        if (query(s, mid) <= K[p])
          l = mid + 1;
        else
          r = mid;
      }
      ++Ans[p], s = l;
    }
  }
  for (int i = 1; i <= Q; ++i) print(Ans[i] - 1), putc('\n');
  return 0;
}