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

建议使用的浏览器:

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

3674:Super Assassin

题目描述

The Nerubian Assassin, Anub'arak, is a notorious hero in the world of DotA. He(It?) might not be a good warrior, but his terrific assaulting abilities can always frighten his enemies. Recently Anub'arak had received an order to kill a very important person. The protection is almost invulnerable, so Anub'arak must make full use of his abilities and try to knock that guy down in several seconds. Due to some fantastic reasons, you are standing at the same side of Anub'arak and you must make a perfect plan for him now.

Anub'arak have N attacking skills, when the ith skill was used alone, it will deal Di damage instantly. Besides, most of Anub'arak 's skill has a powerful effect which can enhance the damage of next strike to a higher level----The skill with an enhancing ability of Ei will produce a (Ei × 10) percent extra damage for the next strike. A skill with Ei = 0 has no enhancing effect. Each of these skills can be used at most once or the enemy will have a chance to counterattack. Since time is not enough, Anub'arak can select at most 6 skills, and your task is to calculate the maximum possible damage. It is guaranteed that the result is a 32-bit integer.

输入解释

The first line of the input file contains a number N (1≤N ≤ 300), which stands for the total skills Anub'arak can use. The following N lines contain two integers each. The first integer Di (10 ≤ Di ≤ 100,000,000, which is a multiple of 10) describes the basic damage of the ith skill, and the second integer Ei (0 ≤ Ei ≤10) describe the enhancing level of the ith skill.

输出解释

Only a integer, which stands for the possible maximum damage.

输入样例
7
700 7
600 6
500 5
400 4
300 3
200 2
100 1
输出样例
3940
提示
The sequence of skills is: (200,2)->(400,4)->(600,6)->(700,7)->(500,5)->(300,3)
Total damage is:200+400*1.2+600*1.4+700*1.6+500*1.7+300*1.5=3940
来自北京大学POJ的附加信息
Case time limit(单组数据时间限制) 2000MS

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3674

最后修改于 2020-10-29T07:07:43+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000 65536