Today's folder: October 18. zip
Today, the brain can't turn around, I can't think of moving rules.
Orz @ bookworm Literary God
T1: Fast row, then the length of the continuous number, simple judgement can be.
T2~T4: Let me think for two more days ...
T2 Original question:
Title 2, ZSC (pig.pas/c/cpp)
"Title description"
You have a ZSC circle, there are n head zsc, you can kill a maximum of ZSC a day to sell, the benefit is ZSC weight. But every day every ZSC weight will fall P[i] (of course, if ZSC weight <=0, natural profit is 0), ask K days your biggest profit.
"Loss of human files"
The first row two numbers n, K;
The second row n number represents the initial weight of the ZSC a[i];
The third row n number represents p[i].
"Output File"
One row of a number represents the maximum profit.
"Sample Input"
2 2
10 10
1 2
"Sample Output"
19
"Data Size"
For 20% of data, meet l≤n≤20;
For l00% data, meet 1≤n≤1000, initial weight ≤10^5.
[Noip Training] October 18