题目描述
Problem Description
Due to continuous heavy rainfall, a reservoir is operating under high load, with water levels exceeding the guaranteed level, on the brink of collapse.
Aya is in charge of water level management for this reservoir. Based on predictions and scheduling from the meteorological and hydrological departments, she has learned the inflow and outflow amounts for the reservoir over the next $n$ hours, denoted as $a_i$ and $b_i$ respectively. The net inflow for the reservoir during the $i$-th hour is defined as the difference between its inflow and outflow during that hour.
Aya believes, based on the actual operation of the reservoir, that if there exists a continuous period of $k$ hours where the sum of the net inflows during these $k$ hours is greater than or equal to a threshold $M$, then the reservoir is at risk of collapse, potentially causing more dangerous floods downstream.
Aya now wants to determine if there is a risk of the reservoir collapsing.
Input Format
The first line contains three positive integers $n, k, M$, as described in the problem.
The second line contains $n$ positive integers, representing the inflow amounts for each hour $a_i$.
The third line contains $n$ positive integers, representing the outflow amounts for each hour $b_i$.
Output Format
If there is a risk of collapse, output Yes; otherwise, output No.
Sample Input and Output
Sample Input #1
6 3 10
6 5 4 3 2 1
1 2 3 4 5 6
Sample Output #1
No
Sample Input #2
6 3 10
9 8 7 6 5 4
1 2 3 4 5 6
Sample Output #2
Yes
Notes
[Sample Explanation]
For Sample $2$, the net inflow for the first three hours is $8 + 6 + 4 = 18$, which is greater than the threshold $10$, indicating a risk of collapse.
[Data Range]
For all data, $1 \leq k \leq n \leq 5000$, $1 \leq a_i, b_i, M \leq 10^9$. Please note the data range.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分