当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
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
Case time limit(单组数据时间限制) | 2000MS |
时间上限 | 内存上限 |
10000 | 65536 |