CF

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Description

LYD loves codeforces since there are many Russian contests. In an contest lasting for T minutes there are n problems, and for the ith problem you can get ai−di∗ti points, where ai indicates the initial points, di indicates the points decreased per minute (count from the beginning of the contest), and ti stands for the passed minutes when you solved the problem (count from the begining of the contest).
Now you know LYD can solve the
ith problem in ci minutes. He can't perform as a multi-core processor, so he can think of only one problem at a moment. Can you help him get as many points as he can?

Input Format

The first line contains two integers n,T(0≤n≤2000,0≤T≤5000).
The second line contains
n integers a1,a2,..,an(0<ai≤6000).
The third line contains
n integers d1,d2,..,dn(0<di≤50).
The forth line contains
n integers c1,c2,..,cn(0<ci≤400).

Output Format

Output an integer in a single line, indicating the maximum points LYD can get.

3 10
100 200 250
5 6 7
2 4 10
254

国庆训练赛

未参加
状态
已结束
规则
XCPC
题目
11
开始于
2017-10-1 20:00
结束于
2017-10-2 1:00
持续时间
5 小时
主持人
参赛人数
51