[Noip Training] October 18

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.