当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5887:Herbs Gathering

题目描述
Collecting one's own plants for use as herbal medicines is perhaps one of the most self-empowering things a person can do, as it implies that they have taken the time and effort to learn about the uses and virtues of the plant and how it might benefit them, how to identify it in its native habitat or how to cultivate it in a garden, and how to prepare it as medicine. It also implies that a person has chosen to take responsibility for their own health and well being, rather than entirely surrender that faculty to another. Consider several different herbs. Each of them has a certain time which needs to be gathered, to be prepared and to be processed. Meanwhile a detailed analysis presents scores as evaluations of each herbs. Our time is running out. The only goal is to maximize the sum of scores for herbs which we can get within a limited time.
输入解释
There are at most ten test cases.
For each case, the first line consists two integers, the total number of different herbs and the time limit.
The $i$-th line of the following $n$ line consists two non-negative integers. The first one is the time we need to gather and prepare the $i$-th herb, and the second one is its score.

The total number of different herbs should be no more than $100$. All of the other numbers read in are uniform random and should not be more than $10^9$.
输出解释
For each test case, output an integer as the maximum sum of scores.
输入样例
3 70
71 100
69 1
1 2
输出样例
3
来自杭电HDUOJ的附加信息
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5887

最后修改于 2020-10-25T23:26:28+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
3000/1000MS(Java/Others) 32768/32768K(Java/Others)