Juicer

题意翻译

### 题目大意 已知一条流水线有 $n$ 个货物要装载,需要装载货物的容量分别是 $a_1$,$a_2$,$\dots$,$a_n$,如果某件货物容量超过 $b$,为不合格货物,不装载,丢弃。   装载货物的箱子容量为 $d$,可以一直装载流水线过来的合格货物,直到超过容量 $d$ 时,做一次特殊的压缩处理,然后封装,之后换新的箱子继续如此安装。   ### 数据输入 第一行,输入三个整数 $n$,$b$,$d$ 第二行,输入 $n$ 个整数 $a_i$ ### 数据输出 一行,输出压缩处理的次数 $cnt$ ### 样例解释 样例 $2$:此样例没有合格产品   样例 $3$:$5$ 和 $7$ 特殊压缩一次   样例 $4$:容量只有 $1$,没有超过 $1$,不需要特殊压缩 ### 数据规模 $1\leq n\leq 100000$ $1\leq b\leq d\leq 1000000$ $1\leq a_i\leq 1000000$

题目描述

Kolya is going to make fresh orange juice. He has $ n $ oranges of sizes $ a_{1},a_{2},...,a_{n} $ . Kolya will put them in the juicer in the fixed order, starting with orange of size $ a_{1} $ , then orange of size $ a_{2} $ and so on. To be put in the juicer the orange must have size not exceeding $ b $ , so if Kolya sees an orange that is strictly greater he throws it away and continues with the next one. The juicer has a special section to collect waste. It overflows if Kolya squeezes oranges of the total size strictly greater than $ d $ . When it happens Kolya empties the waste section (even if there are no more oranges) and continues to squeeze the juice. How many times will he have to empty the waste section?

输入输出格式

输入格式


The first line of the input contains three integers $ n $ , $ b $ and $ d $ ( $ 1<=n<=100000 $ , $ 1<=b<=d<=1000000 $ ) — the number of oranges, the maximum size of the orange that fits in the juicer and the value $ d $ , which determines the condition when the waste section should be emptied. The second line contains $ n $ integers $ a_{1},a_{2},...,a_{n} $ ( $ 1<=a_{i}<=1000000 $ ) — sizes of the oranges listed in the order Kolya is going to try to put them in the juicer.

输出格式


Print one integer — the number of times Kolya will have to empty the waste section.

输入输出样例

输入样例 #1

2 7 10
5 6

输出样例 #1

1

输入样例 #2

1 5 10
7

输出样例 #2

0

输入样例 #3

3 10 10
5 7 7

输出样例 #3

1

输入样例 #4

1 1 1
1

输出样例 #4

0

说明

In the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards. In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all.