Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Super Assassin
Description 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 E will produce a (_{i}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.Input The first line of the input file contains a number D≤ 100,000,000, which is a multiple of 10) describes the basic damage of the _{i }ith skill, and the second integer E (0 ≤ _{i}E ≤10) describe the enhancing level of the _{i}ith skill.Output Only a integer, which stands for the possible maximum damage. Sample Input 7 700 7 600 6 500 5 400 4 300 3 200 2 100 1 Sample Output 3940 Hint 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 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator