AT_abc472_c [ABC472C] On a Diet
Description
Takahashi is staying at his parents' house for an $ N $ -day homecoming trip.
At his parents' house, a snack is prepared every day, and the calorie count of the snack on day $ i $ is $ A_i $ .
To manage his health, he repeats the following: he eats the snack on a given day if and only if the total calorie count of the snacks he has eaten in the most recent $ M $ days does not exceed $ K $ .
Specifically, in the order $ i=1,2,\dots,N $ , he decides whether to eat the snack on day $ i $ according to the following rule:
- Assuming that he eats the snack on day $ i $ , if the total calorie count of the snacks eaten from day $ \max(i-M+1,1) $ through day $ i $ is at most $ K $ , then he actually eats the snack on day $ i $ . Otherwise, he does not eat the snack on day $ i $ .
For each $ i=1,2,\dots,N $ , determine whether Takahashi eats the snack on day $ i $ .
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ M $ $ K $ $ A_1 $ $ A_2 $ $ \dots $ $ A_N $
Output Format
Output $ N $ lines. The $ i $ -th line should contain `Yes` if Takahashi eats the snack on day $ i $ , and `No` otherwise.
Explanation/Hint
### Sample Explanation 1
For each day, assuming that he eats the snack, the total calorie count of the snacks eaten in the most recent three days is as follows:
- Day $ 1 $ : $ 48 $
- Day $ 2 $ : $ 48+73=121 $
- Day $ 3 $ : $ 48+59=107 $
- Day $ 4 $ : $ 90 $
- Day $ 5 $ : $ 21 $
### Constraints
- $ 1 \leq M \leq N \leq 2 \times 10^5 $
- $ 1 \leq K \leq 10^{15} $
- $ 1 \leq A_i \leq 10^9 $
- All input values are integers.