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;
int ans[100005], LOG[100005], n, w, q;
struct node {
  int id, w;
  bool operator<(node x) const { return w < x.w; }
} Q[100005];
struct Node {
  int p, nxt, w;
  bool operator<(Node x) const {
    if (w == x.w) return nxt < x.nxt;
    return w < x.w;
  }
};
vector<Node> V;
int lim[100005], nxt[100005], maxn[17][100005], minn[17][100005], a[100005];
int query(int l, int r) {
  int p = LOG[r - l + 1];
  return max(maxn[p][l], maxn[p][r - (1 << p) + 1]) -
         min(minn[p][l], minn[p][r - (1 << p) + 1]);
}
struct lct {
  struct node {
    int son[2], fa, rev, siz, val, maxn;
  } tree[100005];
  int stck[100005], top;
  int ls(int p) { return tree[p].son[0]; }
  int rs(int p) { return tree[p].son[1]; }
  int fa(int p) { return tree[p].fa; }
  int which(int p) {
    if (rs(fa(p)) == p) return 1;
    if (ls(fa(p)) == p) return 0;
    return -1;
  }
  void pushup(int p) {
    tree[p].siz = tree[ls(p)].siz + tree[rs(p)].siz + 1;
    tree[p].maxn = tree[p].val;
    if (tree[p].val == n + 1) tree[p].maxn = 0;
    if (tree[ls(p)].maxn != n + 1)
      tree[p].maxn = max(tree[p].maxn, tree[ls(p)].maxn);
    if (tree[rs(p)].maxn != n + 1)
      tree[p].maxn = max(tree[p].maxn, tree[rs(p)].maxn);
  }
  void pushdown(int p) {
    if (tree[p].rev) {
      tree[ls(p)].rev ^= 1;
      tree[rs(p)].rev ^= 1;
      swap(tree[p].son[0], tree[p].son[1]);
      tree[p].rev = 0;
    }
  }
  void rotate(int p) {
    int f1 = fa(p), f2 = fa(f1);
    pushdown(f2), pushdown(f1), pushdown(p);
    int now1 = which(p), now2 = which(f1);
    if (now1 == -1) return;
    tree[f1].son[now1] = tree[p].son[now1 ^ 1];
    tree[tree[p].son[now1 ^ 1]].fa = f1;
    tree[p].son[now1 ^ 1] = f1;
    tree[p].fa = f2;
    tree[f1].fa = p;
    if (now2 != -1) tree[f2].son[now2] = p;
    pushup(f1);
    pushup(p);
  }
  void splay(int p) {
    int pp = p;
    while (which(p) != -1) stck[++top] = p, p = fa(p);
    stck[++top] = p;
    while (top) pushdown(stck[top--]);
    p = pp;
    while (which(p) != -1) {
      int f1 = fa(p);
      if (which(f1) != -1) {
        if (which(p) == which(f1))
          rotate(f1);
        else
          rotate(p);
      }
      rotate(p);
    }
  }
  void access(int p) {
    int tmp = 0;
    while (p) {
      splay(p);
      tree[p].son[1] = tmp;
      pushup(p);
      tmp = p;
      p = fa(p);
    }
  }
  void makeroot(int p) {
    access(p);
    splay(p);
    tree[p].rev ^= 1;
  }
  int findroot(int p) {
    access(p);
    splay(p);
    pushdown(p);
    while (ls(p)) p = ls(p), pushdown(p);
    splay(p);
    return p;
  }
  void link(int x, int y) {
    makeroot(x);
    if (findroot(y) != x) tree[x].fa = y;
  }
  void cut(int x, int y) {
    makeroot(x);
    if (findroot(y) == x && !ls(y) && tree[x].son[1] == y) {
      tree[x].son[1] = tree[y].fa = 0;
      pushup(x);
    }
  }
} LCT;
int main() {
  cin >> n >> w >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= q; i++) cin >> Q[i].w;
  for (int i = 1; i <= q; i++) {
    Q[i].w = w - Q[i].w;
    Q[i].id = i;
  }
  sort(Q + 1, Q + q + 1);
  for (int i = 1; i <= n; i++) {
    maxn[0][i] = a[i];
    minn[0][i] = a[i];
  }
  for (int i = 1; i <= 16; i++)
    for (int j = 1; j + (1 << i) - 1 <= n; j++) {
      maxn[i][j] = max(maxn[i - 1][j], maxn[i - 1][j + (1 << i - 1)]);
      minn[i][j] = min(minn[i - 1][j], minn[i - 1][j + (1 << i - 1)]);
    }
  int block = 40;
  for (int i = 2; i <= n; i++) LOG[i] = LOG[i >> 1] + 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= block; j++) {
      int r = i + j;
      if (r > n) break;
      int tmp = query(i, r);
      V.push_back(Node{i, r, tmp});
    }
    if (i + block + 1 <= n)
      lim[i] = query(i, i + block + 1);
    else
      lim[i] = query(i, n);
  }
  vector<pair<int, int> > v;
  for (int i = 1; i <= n; i++) v.push_back(make_pair(lim[i], i));
  int poss = 0;
  sort(v.begin(), v.end());
  for (int i = 1; i <= n; i++) {
    LCT.tree[i].fa = i + 1;
    LCT.tree[i].siz = 1;
    LCT.tree[i].val = i;
    nxt[i] = i;
  }
  sort(V.begin(), V.end());
  int pos = 0;
  for (int i = 1; i <= q; i++) {
    int ww = Q[i].w;
    while (pos < V.size() && V[pos].w <= ww) {
      int p = V[pos].p;
      LCT.cut(p, nxt[p] + 1);
      nxt[p] = V[pos].nxt;
      LCT.link(p, nxt[p] + 1);
      pos++;
    }
    while (poss < v.size() && v[poss].first <= ww)
      LCT.cut(v[poss].second, nxt[v[poss].second] + 1),
          LCT.link(v[poss].second, n + 1), ++poss;
    int p = 1;
    bool flag = 0;
    while (p != n + 1) {
      if (lim[p] <= ww) {
        int l = p, r = n, anss = n + 1;
        while (l <= r) {
          int mid = (l + r) >> 1;
          if (query(p, mid) > ww)
            anss = mid, r = mid - 1;
          else
            l = mid + 1;
        }
        if (!flag) ans[Q[i].id]++;
        flag = 0;
        p = anss;
      } else {
        LCT.makeroot(p);
        LCT.access(n + 1);
        LCT.splay(n + 1);
        if (p == LCT.tree[n + 1].maxn) {
          if (!flag) ans[Q[i].id]++;
          p++;
          continue;
        }
        if (flag) ans[Q[i].id]--;
        ans[Q[i].id] += -1 + LCT.tree[n + 1].siz;
        p = LCT.tree[n + 1].maxn;
        flag = 1;
      }
    }
  }
  for (int i = 1; i <= q; i++) cout << ans[i] - 1 << '\n';
}