题号:NC229641
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
In Xiao K's QQ group, Xiao T always gets weird and weird.
Xiao T will speak in the group for
days, and xiao K has an anger value of
.
Xiao T has an ability value every day, and the ability value on day
is
. Every day, Xiao T will choose whether to laugh at Xiao K. If Xiao T chooses to laugh at Xiao K on day
, Xiao K will be hurt by
from Xiao T. On this basis, if Xiao T's ability value
exceeds Xiao K's anger value
, Xiao K will be furious and ban Xiao T for
days. That is to say, in
days, Xiao T will be banned.
Now, Xiao T wants to maximize the damage to Xiao K, but Xiao T is too bad to solve this problem, so he found you. hope you can help him solve this problem. You only need to find out the maximum damage caused by Xiao T to Xiao K.
输入描述:
The first line contains three positive integers

The second line contains

positive integers

。
输出描述:
Only one number per line is output, indicating the biggest damage caused by Xiao T to Xiao K。
示例2
输入
复制
20 2 16
20 5 8 2 18 16 2 16 16 1 5 16 2 13 6 16 4 17 21 7